Sha256: 4cb9668aabb85d6c65373462459aa64165944470b7c614a8ade5cc2ac9879fd5

Contents?: true

Size: 402 Bytes

Versions: 11

Compression:

Stored size: 402 Bytes

Contents

require 'facets/module/rename_method'
require 'test/unit'

class Test_Module_Rename_Method < Test::Unit::TestCase

  def a; "A" ; end

  rename_method :b, :a

  def test_rename_method
    assert( ! respond_to?( :a ) )
    assert( respond_to?( :b ) )
  end

  # rename

  def c; "C" ; end

  rename :d, :c

  def test_rename
    assert( ! respond_to?( :c ) )
    assert( respond_to?( :d ) )
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

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