Sha256: cf4d2d8719d2262ee051c946a1854211ed197fa7f51819e2f38ff23f6717d7d0

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facet/kernel/singleton.rb
#
# Extracted Wed Jan 25 11:25:39 EST 2006
# Unit Tools Reap Test Extractor
#

require 'facet/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.0.3 packages/core/test/lib/facet/kernel/test_singleton.rb