-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from trekdemo/gs-add-async-producer-method
Add #async_producer and #shutdown
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,33 @@ | ||
RSpec.describe Fake::Kafka do | ||
it "has a version number" do | ||
subject(:kafka) { described_class.new } | ||
|
||
it 'has a version number' do | ||
expect(Fake::Kafka::VERSION).not_to be nil | ||
end | ||
|
||
it "does something useful" do | ||
expect(false).to eq(true) | ||
describe '#producer' do | ||
subject(:producer) { kafka.producer } | ||
|
||
it { is_expected.to be_a(described_class::Producer) } | ||
|
||
context 'when invalid options are passed' do | ||
specify do | ||
expect { kafka.producer(foo: 'x') } | ||
.to raise_error(ArgumentError) | ||
end | ||
end | ||
end | ||
|
||
describe '#async_producer' do | ||
subject(:producer) { kafka.async_producer } | ||
|
||
it { is_expected.to be_a(described_class::Producer) } | ||
|
||
context 'when invalid options are passed' do | ||
specify do | ||
expect { kafka.async_producer(foo: 'x') } | ||
.to raise_error(ArgumentError) | ||
end | ||
end | ||
end | ||
end |