1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-01-31 17:27:13 +00:00

Ensure we are only adding actual Flow objects in Rackstash::Flows.new

This commit is contained in:
Holger Just 2017-05-09 22:22:25 +02:00
parent 54c10a0576
commit 7ffdc527af

View File

@ -32,6 +32,13 @@ describe Rackstash::Flows do
list_with_splat = Rackstash::Flows.new(*raw_flows)
expect(list_with_splat.size).to eql 3
end
it 'creates flows if necessary' do
flow_class = class_double('Rackstash::Flow').as_stubbed_const
expect(flow_class).to receive(:new).with(:dummy).and_return(a_flow)
Rackstash::Flows.new(:dummy)
end
end
describe '#<<' do