Sha256: 31668ca1ad1562029e74b46fa567811be369f251fdbb3db4d7999d6743e12f06
Contents?: true
Size: 582 Bytes
Versions: 5
Compression:
Stored size: 582 Bytes
Contents
covers 'facets/module/copy_inheritor' test_case Module do method :copy_inheritor do setup do m1 = Module.new do copy_inheritor :koko, [] koko << 1 end c1 = Class.new do include m1 #inheritor :koko, [], :+ koko << 2 koko << 3 end c2 = Class.new do include m1 #inheritor :koko, [], :+ koko << 4 end @m1, @c1, @c2 = m1, c1, c2 end test do @m1.koko.assert == [1] @c1.koko.assert == [1,2,3] @c2.koko.assert == [1,4] end end end
Version data entries
5 entries across 5 versions & 2 rubygems