Sha256: 8ab2f44bd596ed7978723779aa76a734433a227fbdc2a3bb1ff0922e5fae3532

Contents?: true

Size: 407 Bytes

Versions: 4

Compression:

Stored size: 407 Bytes

Contents

require 'test/unit'

class TC_Arraysym < Test::Unit::TestCase

  def setup
  end

  def test_simple
    a = {}
    a._hi = 'there'
    assert_equal 'there', a[:hi]
  end

  def test_replace
    a = {'one' => 1, two: 2}
    assert_equal 1, a._one
    assert_equal 2, a._two

    a._one = 3
    a._two = 4
    assert_equal 3, a._one
    assert_equal 4, a._two
    assert_equal ['one', :two], a.keys
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
helper_classes-1.9.1312 test/hc_hashaccessor.rb
helper_classes-1.9.13.pre.12 test/hc_hashaccessor.rb
helper_classes-1.9.13.pre.11 test/hc_hashaccessor.rb
helper_classes-1.9.13.pre.10 test/hc_hashaccessor.rb