Skip to content

Commit

Permalink
More linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
angad-singh committed Sep 16, 2020
1 parent d68a56a commit 99d30b3
Showing 1 changed file with 12 additions and 25 deletions.
37 changes: 12 additions & 25 deletions spec/producer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,39 +307,26 @@ def self.partition_key(payload)
it 'should raise error if blank topic is passed in explicitly' do
expect {
MyProducer.publish_list(
[{
'test_id' => 'foo',
'some_int' => 123
},
{
'test_id' => 'bar',
'some_int' => 124
}],
[{ 'test_id' => 'foo',
'some_int' => 123 },
{ 'test_id' => 'bar',
'some_int' => 124 }],
topic: ''
)
}.to raise_error(
RuntimeError,
'Topic not specified. Please specify the topic.'
)

}.to raise_error(RuntimeError,
'Topic not specified. Please specify the topic.')
end

it 'should raise error if the producer has not been initialized with a topic' do
expect {
MyNoTopicProducer.publish_list(
[{
'test_id' => 'foo',
'some_int' => 123
},
{
'test_id' => 'bar',
'some_int' => 124
}]
[{ 'test_id' => 'foo',
'some_int' => 123 },
{ 'test_id' => 'bar',
'some_int' => 124 }]
)
}.to raise_error(
RuntimeError,
'Topic not specified. Please specify the topic.'
)
}.to raise_error(RuntimeError,
'Topic not specified. Please specify the topic.')
end

it 'should error with nothing set' do
Expand Down

0 comments on commit 99d30b3

Please sign in to comment.