# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/basicobject.rb # # Extracted Wed Aug 23 18:22:52 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/more/basicobject.rb' require 'test/unit' class TCBasicObject < Test::Unit::TestCase class A < BasicObject end def setup @a = A.new end def test_001 assert( ! @a.__class__.method_defined?( :id ) ) assert( ! @a.__class__.method_defined?( :class ) ) end def test_002 assert( @a.__class__.method_defined?( :__id__ ) ) assert( @a.__class__.method_defined?( :__send__ ) ) assert( @a.__class__.method_defined?( :__self__ ) ) assert( @a.__class__.method_defined?( :dup ) ) #assert( @a.__class__.method_defined?( :as ) ) end def test_003 assert_equal( A, @a.__self__.class ) end def test_004 Kernel.module_eval { def xxx ; end } assert( ! @a.__class__.method_defined?( :xxx ) ) end def test_005 Object.class_eval { def yyy ; end } assert( ! @a.__class__.method_defined?( :yyy ) ) end def test_006 Object.class_eval { def yyy ; end } assert( ! @a.__self__.methods.include?( 'yyy' ) ) end def test_007 Object.class_eval { def yyy ; end } assert( ! @a.__class__.method_defined?( :methods ) ) assert( ! @a.__methods__.include?( :methods ) ) end end