Sha256: 50189d83a8a736127d7788660730ffd84d21f5e30c22200e84776d1a49016795

Contents?: true

Size: 519 Bytes

Versions: 4

Compression:

Stored size: 519 Bytes

Contents

covers 'facets/module/copy_inheritor'

tests Module do

  context "" 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]
  end

  unit :copy_inheritor do |c|
    m1,c1,c2 = c
    m1.koko.assert == [1]
    c1.koko.assert == [1,2,3]
    c2.koko.assert == [1,4]
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core-uncommon/module/test_copy_inheritor.rb
facets-2.9.0 test/tour/module/test_copy_inheritor.rb
facets-2.9.0.pre.2 test/tour/module/test_copy_inheritor.rb
facets-2.9.0.pre.1 test/tour/module/test_copy_inheritor.rb