Sha256: 3c52b8d116646178c9a541d92e216e7c0a8436f4f0aea47c2836430e2a0741f6
Contents?: true
Size: 639 Bytes
Versions: 3
Compression:
Stored size: 639 Bytes
Contents
# Test for facets/module/include.rb require 'facets/module/include.rb' require 'test/unit' class TestInclude < Test::Unit::TestCase def test_ancestor assert( self.class.ancestor?(::Test::Unit::TestCase) ) end end class TestOnInclude < Test::Unit::TestCase module M def self.check ; @@check ; end on_included %{ @@check = 1 } end module Q def self.check ; @@check ; end on_included %{ @@check = 1 } on_included %{ @@check = 2 } end class C include M include Q end def test_included assert_equal(1, M.check) assert_equal(2, Q.check) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-2.2.0 | test/unit/module/test_include.rb |
facets-2.2.1 | test/unit/module/test_include.rb |
facets-2.3.0 | test/core/module/test_include.rb |