Sha256: 150cc1e5e1eedf6969f79dc79aa5ac46a35dc994385f804a6216458ccfc8cf95

Contents?: true

Size: 405 Bytes

Versions: 4

Compression:

Stored size: 405 Bytes

Contents

covers 'facets/module/rename_method'

testcase Module do

  unit :rename_method do
    c = Class.new do
      def a; "A" ; end
      rename_method :b, :a
    end

    c.new.refute.respond_to?(:a)
    c.new.assert.respond_to?(:b)
  end

  unit :rename do
    c = Class.new do
      def c; "C" ; end
      rename :d, :c
    end

    c.new.refute.respond_to?(:c)
    c.new.assert.respond_to?(:d)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/module/test_rename_method.rb
facets-2.9.0 test/core/module/test_rename_method.rb
facets-2.9.0.pre.2 test/core/module/test_rename_method.rb
facets-2.9.0.pre.1 test/core/module/test_rename_method.rb