Sha256: b7b24256bbd84efdcbefca268f7e63e83c711a37dd372d376020d15bfc80f8c0

Contents?: true

Size: 442 Bytes

Versions: 11

Compression:

Stored size: 442 Bytes

Contents

require 'helper'

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

11 entries across 11 versions & 1 rubygems

Version Path
olelo-0.9.15 test/hash_extensions_test.rb
olelo-0.9.14 test/hash_extensions_test.rb
olelo-0.9.13 test/hash_extensions_test.rb
olelo-0.9.12 test/hash_extensions_test.rb
olelo-0.9.11 test/hash_extensions_test.rb
olelo-0.9.10 test/hash_extensions_test.rb
olelo-0.9.9 test/hash_extensions_test.rb
olelo-0.9.8 test/hash_extensions_test.rb
olelo-0.9.7 test/hash_extensions_test.rb
olelo-0.9.6 test/hash_extensions_test.rb
olelo-0.9.5 test/hash_extensions_test.rb