Sha256: 2b673c1f51c99c3c419d5f9a89fbc33ee177e1888ca5c43eee73900227365bad

Contents?: true

Size: 772 Bytes

Versions: 1

Compression:

Stored size: 772 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/module/alias_method_chain.rb
#
# Extracted Fri Feb 16 02:00:36 EST 2007
# Project.rb Test Extraction
#

require 'facets/core/module/alias_method_chain.rb'


  require 'test/unit'

  class TestAliasChain < Test::Unit::TestCase

    module X
      def self.included(base)
        base.module_eval {
          alias_method_chain :foo, :feature
        }
      end
      def foo_with_feature
        foo_without_feature + '!'
      end
    end

    class Y
      def foo
        "FOO"
      end
      include X
      #alias_method_chain :foo, :feature
    end

    def test_001
      y = Y.new
      assert_equal( "FOO!", y.foo )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.8.49 test/lib/facets/core/module/test_alias_method_chain.rb