Sha256: b0f09dc6c20956b0c44fa00929aa94e469389d61e3b4bd4d9f7dfd7e6c017e04

Contents?: true

Size: 395 Bytes

Versions: 5

Compression:

Stored size: 395 Bytes

Contents

covers 'facets/module/abstract'

test_case Module do

  method :abstract do

    test "in a module" do
      m = Module.new{ abstract :q }
      c = Class.new{ include m }
      x = c.new
      TypeError.assert.raised?{ x.q }
    end

    test "in a class" do
      c = Class.new{ abstract :q }
      #c.pry.abstract :q
      x = c.new
      TypeError.assert.raised?{ x.q }
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/module/test_abstract.rb
facets-3.1.0 test/core/module/test_abstract.rb
facets-3.0.0 test/core/module/test_abstract.rb
facets-2.9.3 test/core/module/test_abstract.rb
facets-2.9.2 test/core/module/test_abstract.rb