Sha256: 5fc001fa7fa72dfa94cc4e1eb4e99c1950c8d95d3bdbb499fb7787657d668415

Contents?: true

Size: 415 Bytes

Versions: 5

Compression:

Stored size: 415 Bytes

Contents

covers 'facets/hash/alias'

test_case Hash do

  method :alias! do

    test do
      foo = { 'a'=>1, 'b'=>2 }
      foo.alias!('c','b').assert == { 'a'=>1, 'b'=>2, 'c'=>2 }
    end

    test do
      foo = { 'a'=>1, 'b'=>2 }
      foo.alias!(:a,'a').assert == { :a=>1, 'a'=>1, 'b'=>2 }
    end

    test do
      foo = { :a=>1, :b=>2 }
      foo.alias!('bar','foo').assert == { :a=>1, :b=>2 }
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/hash/test_alias.rb
facets-3.1.0 test/core/hash/test_alias.rb
facets-3.0.0 test/core/hash/test_alias.rb
facets-2.9.3 test/core/hash/test_alias.rb
facets-2.9.2 test/core/hash/test_alias.rb