mirror of
https://github.com/meineerde/rackstash.git
synced 2025-10-17 14:01:01 +00:00
Return only present flows from Flows#to_ary
This commit is contained in:
parent
b2c1a1da0e
commit
eb6cb29440
@ -46,7 +46,7 @@ module Rackstash
|
|||||||
alias size length
|
alias size length
|
||||||
|
|
||||||
def to_ary
|
def to_ary
|
||||||
@flows.to_a
|
@flows.to_a.compact
|
||||||
end
|
end
|
||||||
alias to_a to_ary
|
alias to_a to_ary
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ describe Rackstash::Flows do
|
|||||||
it 'adds nil flows if necessary' do
|
it 'adds nil flows if necessary' do
|
||||||
flow = a_flow
|
flow = a_flow
|
||||||
flows[3] = flow
|
flows[3] = flow
|
||||||
expect(flows.to_a).to eql [nil, nil, nil, flow]
|
expect(flows.length).to eql 4
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'tries to find a matching flow' do
|
it 'tries to find a matching flow' do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user