Sha256: d82ce7b2ee4ae0bae799065c3913fa861870fdc5c0b9aaf98dac9a2ffe7a7020
Contents?: true
Size: 1.44 KB
Versions: 1
Compression:
Stored size: 1.44 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/basicobject.rb # # Extracted Wed Jul 05 11:47:50 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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.4.5 | test/lib/facets/more/test_basicobject.rb |