/vendor/gems/facets-2.4.5/test/core/module/test_prepend.rb
https://bitbucket.org/mediashelf/fedora-migrator · Ruby · 29 lines · 17 code · 8 blank · 4 comment · 0 complexity · 16421f3226dc15d102cd6ee701e8d559 MD5 · raw file
- require 'facets/module/prepend'
- require 'test/unit'
- class Test_Module_Prepend < Test::Unit::TestCase
- module M
- def q; "qm"; end
- end
- module N
- prepend M
- def q; "qn"; end
- end
- class X
- include N
- end
- def test_prepend_module_method
- assert_equal( "qm", N.q )
- end
- # Wish this worked.
- #def test_prepend_instance_method
- # assert_equal( "qm", X.new.q )
- #end
- end