1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-02-01 01:37:12 +00:00

Fix test to ensure that hashes passed to Buffer#tag are actually stringified

This commit is contained in:
Holger Just 2019-10-07 19:50:29 +02:00
parent 7f5337c0e2
commit b3466779bb

View File

@ -458,12 +458,12 @@ RSpec.describe Rackstash::Buffer do
end
it 'stringifys tags and expands procs' do
buffer.tag 123, :symbol, -> { :proc }
expect(buffer.tags).to contain_exactly('123', 'symbol', 'proc')
buffer.tag 123, {}, :symbol, -> { :proc }
expect(buffer.tags).to contain_exactly('123', '{}', 'symbol', 'proc')
end
it 'does not set blank tags' do
buffer.tag 'tag', nil, [], '', {}
buffer.tag 'tag', nil, [], ''
expect(buffer.tags).to contain_exactly('tag')
end