Sha256: e118b48a6392bc6002a9f1705013e025362ef00b2096539e746583e36b12bccb
Contents?: true
Size: 925 Bytes
Versions: 1
Compression:
Stored size: 925 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/module/namespace.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/module/namespace.rb' require 'test/unit' class TestNamespace1 < Test::Unit::TestCase module M def x; "x"; end end class C namespace 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 namespace :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/module/test_namespace.rb |