Sha256: 6d7ced6509922251701990270af32c8006d72c3d92c474fa7a1b17100e415a73

Contents?: true

Size: 371 Bytes

Versions: 11

Compression:

Stored size: 371 Bytes

Contents

require 'facets/module/alias_accessor'
require 'test/unit'

class Test_Module_Alias_Accessor < Test::Unit::TestCase

  class X
    attr_accessor :x
    alias_accessor :y, :x
  end

  def test_alias_accessor
    x = X.new
    x.x = 10
    assert_equal( 10, x.x )
    assert_equal( 10, x.y )
    x.y = 20
    assert_equal( 20, x.x )
    assert_equal( 20, x.y )
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/module/test_alias_accessor.rb
facets-2.8.3 test/core/module/test_alias_accessor.rb
facets-2.8.2 test/core/module/test_alias_accessor.rb
facets-2.8.1 test/core/module/test_alias_accessor.rb
facets-2.8.0 test/core/module/test_alias_accessor.rb
facets-2.7.0 test/core/module/test_alias_accessor.rb
facets-2.6.0 test/core/module/test_alias_accessor.rb
facets-2.5.0 test/core/module/test_alias_accessor.rb
facets-2.5.1 test/core/module/test_alias_accessor.rb
facets-2.4.5 test/core/module/test_alias_accessor.rb
facets-2.5.2 test/core/module/test_alias_accessor.rb