Sha256: bc222296c0d8e6001024bc26b0a6b4b1c274268cb9c9a3e537e7fb5a4116b5ed
Contents?: true
Size: 862 Bytes
Versions: 4
Compression:
Stored size: 862 Bytes
Contents
covers 'facets/module/method_clash' tests Module do x = Class.new do def q1; "q1"; end def x1; "x1"; end def r1; "r1"; end private def q2; "q2"; end def x2; "x1"; end protected def q3; "q3"; end def x3; "x3"; end end y = Class.new do def q1; "q1"; end def y1; "y1"; end private def q2; "q2"; end def y2; "y2"; end def r1; "r1"; end protected def q3; "q3"; end def y3; "y3"; end end z = Class.new unit :method_clash? do x.assert.method_clash?(y) y.assert.method_clash?(x) z.refute.method_clash?(x) x.refute.method_clash?(z) end unit :method_clash do c = x.method_clash(y) c.map!{ |m| m.to_s } %w{r1 q1 q2 q3}.each do |x| c.assert.include?(x) end %w{x1 x2 x3 y1 y2 y3}.each do |x| c.refute.include?(x) end end end
Version data entries
4 entries across 4 versions & 1 rubygems