Sha256: 761f9557ebafda51069121592106d78cfea1ca83653d70c999697c4e2bc5ae3e
Contents?: true
Size: 932 Bytes
Versions: 9
Compression:
Stored size: 932 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ | # |_|\___||___/\__| # # for lib/facets/namespace.rb # # Extracted Mon Sep 03 16:23:07 -0700 2007 # w/ Test Extraction Ratchet # require 'facets/namespace.rb' require 'test/unit' class TestNamespace1 < Test::Unit::TestCase module M def x; "x"; end end class C method_space M end def test_01 c = C.new assert_equal('x', c.m.x) end def test_02 c = C.new assert_raises(NoMethodError){ c.x } end end class TestNamespace2 < Test::Unit::TestCase class B def x; 1; end end class C < B def x; super; end method_space :m do def x; "x"; end end end def test_01 c = C.new assert_equal('x', c.m.x) end def test_02 c = C.new assert_equal(1, c.x) end end
Version data entries
9 entries across 9 versions & 1 rubygems