Sha256: fa0624508b707bbfd6dd560c66e9868fd67ec4767736829c1cc6332d8c62e1d2
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/module/instance_methods.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/module/instance_methods.rb' require 'test/unit' # fixture class O def a ; end end # get a hold of the original definition _before require_ $imF = Module.instance_method( :instance_methods ) class TC_Methods < Test::Unit::TestCase def test_instance_methods assert_equal( $imF.bind(O).call.sort, O.instance_methods ) end def test_instance_methods_true assert_equal( $imF.bind(O).call(true).sort, O.instance_methods(true) ) end def test_public_instance_methods assert_equal( O.public_instance_methods.sort, O.instance_methods ) end def test_private_instance_methods assert_equal( O.private_instance_methods.sort, O.instance_methods(:private) ) end def test_protected_instance_methods assert_equal( O.protected_instance_methods.sort, O.instance_methods(:protected) ) end def test_local_instance_methods assert_equal( ["a"], O.instance_methods(:local) ) end def test_instance_method_local_and_ancestors assert_equal( $imF.bind(O).call(true).sort, O.instance_methods(:local, :ancestors) ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/module/test_instance_methods.rb |