Sha256: 337b7e4ead06ecb2c5c7eeb1922b57a12cc8f7969377dab8b2a394e2925cebb7
Contents?: true
Size: 472 Bytes
Versions: 11
Compression:
Stored size: 472 Bytes
Contents
require 'facets/module/alias_method_chain' require 'test/unit' class Test_Module_Alias_Method_Chain < 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 end def test_alias_method_chian y = Y.new assert_equal( "FOO!", y.foo ) end end
Version data entries
11 entries across 11 versions & 1 rubygems