Sha256: 2ed5225c08f903ebb648a796f3c62863bbbc1d277b1bee20907317c2449520ed
Contents?: true
Size: 426 Bytes
Versions: 1
Compression:
Stored size: 426 Bytes
Contents
require 'rails_helper' describe NilClass do describe '#+' do it 'can be added to a string' do expect(nil + 'hello').to eq('hello') end it 'can be added to an integer' do expect(nil + 1).to eq(1) end it 'can be added to a float' do expect(nil + 1.5).to eq(1.5) end end describe '#to_bool' do it 'returns false' do expect(nil.to_bool).to eq(false) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heartwood-0.0.1 | spec/lib/support/nil_class_spec.rb |