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

Don't rely on nil being frozen in tests

Turns out, in JRuby 9.1, nil is not frozen. In all other supported
Rubies, `nil.frozen?` is true.
This commit is contained in:
Holger Just 2017-02-02 17:55:04 +01:00
parent 7bc351faae
commit 0a011efc32

View File

@ -254,9 +254,9 @@ describe Rackstash::Fields::AbstractCollection do
end
it 'normalizes values to frozen UTF-8 strings' do
array = [1, :two, 'three', nil]
array = [1, :two, 'three']
expect(normalize(array, wrap: false)).to eql [1, 'two', 'three', nil]
expect(normalize(array, wrap: false)).to eql [1, 'two', 'three']
expect(normalize(array, wrap: false)).to all be_frozen
end