1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Improve code formatting in specs for Rackstash::Flows

This commit is contained in:
Holger Just 2017-05-09 22:21:19 +02:00
parent da8904f412
commit 54c10a0576

View File

@ -24,12 +24,12 @@ describe Rackstash::Flows do
end
it 'accepts a list of flows' do
flows = 3.times.map { a_flow }
raw_flows = Array.new(3) { a_flow }
list_with_array = Rackstash::Flows.new(flows)
list_with_array = Rackstash::Flows.new(raw_flows)
expect(list_with_array.size).to eql 3
list_with_splat = Rackstash::Flows.new(*flows)
list_with_splat = Rackstash::Flows.new(*raw_flows)
expect(list_with_splat.size).to eql 3
end
end
@ -163,12 +163,12 @@ describe Rackstash::Flows do
describe '#length' do
it 'returns the number of flows' do
expect { flows << a_flow}
expect { flows << a_flow }
.to change { flows.length }.from(0).to(1)
end
it 'can use size alias' do
expect { flows << a_flow}
expect { flows << a_flow }
.to change { flows.size }.from(0).to(1)
end
end