Sha256: 19225502c4e00308974d9854ed8ccbc7abc184f29f28f052b8007ba718b9d513

Contents?: true

Size: 452 Bytes

Versions: 5

Compression:

Stored size: 452 Bytes

Contents

require 'olelo/extensions'

describe 'Hash extensions' do
  it 'should have #with_indifferent_access' do
    {}.with_indifferent_access.should.equal Hash.with_indifferent_access

    hash = Hash.with_indifferent_access
    hash[:a] = 10
    hash['a'].should.equal 10
    hash[:a].should.equal 10
    hash.include?(:a).should.be.true
    hash.include?('a').should.be.true
    hash.include?(:b).should.be.false
    hash.keys.should.equal %w(a)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
olelo-0.9.4 test/hash_extensions_test.rb
olelo-0.9.3 test/hash_extensions_test.rb
olelo-0.9.2 test/hash_extensions_test.rb
olelo-0.9.1 test/hash_extensions_test.rb
olelo-0.9.0 test/hash_extensions_test.rb