# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/basicobject.rb # # Extracted Fri Apr 14 10:02:13 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__.instance_methods.all? do |m| m =~ BasicObject::EXCLUDE or m == 'instance' end ) end def test_002 Kernel.module_eval { def xxx ; end } assert( ! @a.__class__.method_defined?( :xxx ) ) end def test_003 Object.class_eval { def yyy ; end } assert( ! @a.__class__.method_defined?( :yyy ) ) end def test_004 Object.class_eval { def yyy ; end } assert( ! @a.__self__.methods.include?( 'yyy' ) ) end def test_005 assert( @a.__self__.methods.include?( '__id__' ) ) assert( @a.__self__.methods.include?( '__send__' ) ) assert( @a.__self__.methods.include?( '__class__' ) ) end end