Sha256: 484e5ce654e88e290cd2d8a2bca2061101de349a865865ad089e365ca63dd42a

Contents?: true

Size: 476 Bytes

Versions: 24

Compression:

Stored size: 476 Bytes

Contents

describe Ufo::Utils::Squeezer do
  subject { Ufo::Utils::Squeezer.new(data) }

  context("Array with nil") do
    let(:data) { [nil] }
    # Prevents infinite loop
    it "remove nil" do
      squeezed = subject.squeeze
      expect(squeezed).to eq []
    end
  end

  context("Hash with nil value") do
    let(:data) { {a: 1, b: nil } }
    # Prevents infinite loop
    it "remove nil" do
      squeezed = subject.squeeze
      expect(squeezed).to eq(a: 1)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
ufo-6.3.13 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.12 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.11 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.10 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.9 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.8 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.7 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.6 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.5 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.4 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.3 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.2 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.1 spec/ufo/utils/squeezer_spec.rb
ufo-6.3.0 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.5 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.4 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.3 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.2 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.1 spec/ufo/utils/squeezer_spec.rb
ufo-6.2.0 spec/ufo/utils/squeezer_spec.rb