Sha256: e5774d939d7700827a0182e635871353aeba13d455af2fbc4dc9cac9f18004dd

Contents?: true

Size: 448 Bytes

Versions: 1

Compression:

Stored size: 448 Bytes

Contents

describe NilConditional do
  context 'nil value' do
    it 'should be considered as nil' do
      expect(NilConditional.new.nil?).to be(true)
      expect(NilConditional.new).to eq(nil)
      expect(NilConditional.new).to eql(nil)
    end
  end

  context 'missing method behavior' do
    it 'return new NilConditional object when method is missing' do
      expect(NilConditional.new.non_existent_method).to be_a(NilConditional)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nil_conditional-1.0.0 spec/nil_conditional_spec.rb