Sha256: 4d1e02ce1ba5667638fc08ece495572a850bcf46a4272b97880316fcdab496a0

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

require 'spec_helper'

describe NilClass do
  describe "#to_yes_no" do
    it 'converts correctly with no options' do
      nil.to_yes_no.should == ""
    end
    it 'converts correctly with if_nil option' do
      nil.to_yes_no(:if_nil => "Unspecified") == "Unspecified"
    end
  end

  describe "#not_nil?" do
    it 'works' do
      nil.not_nil?.should == false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
corelib-0.0.7 spec/nil/core_spec.rb