mirror of
https://github.com/meineerde/rackstash.git
synced 2025-12-24 00:21:11 +00:00
Improve code formatting in specs for Rackstash::Flows
This commit is contained in:
parent
da8904f412
commit
54c10a0576
@ -24,12 +24,12 @@ describe Rackstash::Flows do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'accepts a list of flows' do
|
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
|
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
|
expect(list_with_splat.size).to eql 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -163,12 +163,12 @@ describe Rackstash::Flows do
|
|||||||
|
|
||||||
describe '#length' do
|
describe '#length' do
|
||||||
it 'returns the number of flows' do
|
it 'returns the number of flows' do
|
||||||
expect { flows << a_flow}
|
expect { flows << a_flow }
|
||||||
.to change { flows.length }.from(0).to(1)
|
.to change { flows.length }.from(0).to(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can use size alias' do
|
it 'can use size alias' do
|
||||||
expect { flows << a_flow}
|
expect { flows << a_flow }
|
||||||
.to change { flows.size }.from(0).to(1)
|
.to change { flows.size }.from(0).to(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user