Sha256: 96b322222433ec67d483e29952767e1bc18d648bd3e5798fe71cb89e75d4e45e
Contents?: true
Size: 762 Bytes
Versions: 1
Compression:
Stored size: 762 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/kernel/singleton.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/kernel/singleton.rb' require 'test/unit' class TCKernel < Test::Unit::TestCase def test_singleton o = Object.new assert_equal( (class << o; self; end), o.singleton ) end #def test_singleton_eval # assert_nothing_raised do # o.singleton_class_eval{ @@a = "test" } # end #end #def test_singleton_method # assert_nothing_raised do # o.define_singleton_method(:testing){ |x| x + 1 } # end # assert_equal(2, o.testing(1) ) #end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/kernel/test_singleton.rb |