Sha256: e5b3c0bd63a6cbd5581b697cf6335c677499d966656ab4fe553be89c0f7281fb

Contents?: true

Size: 485 Bytes

Versions: 11

Compression:

Stored size: 485 Bytes

Contents

# Test facets/uninheritable.rb

require 'facets/uninheritable.rb'
require 'test/unit'

class TC_Uninheritable < Test::Unit::TestCase

  class Cannot
    extend Uninheritable
  end

  class Can
  end

  def test_module
    assert_nothing_raised {
      self.instance_eval <<-EOS
        class A < Can; end
      EOS
    }
    assert_raises(TypeError, "Class Cannot cannot be subclassed.") do
      self.instance_eval <<-EOS
        class B < Cannot; end
      EOS
    end
  end

end



Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.6.0 test/more/test_uninheritable.rb
facets-2.4.0 test/test_uninheritable.rb
facets-2.3.0 test/mixin/test_uninheritable.rb
facets-2.4.1 test/test_uninheritable.rb
facets-2.4.3 test/more/test_uninheritable.rb
facets-2.4.4 test/more/test_uninheritable.rb
facets-2.4.2 test/more/test_uninheritable.rb
facets-2.5.0 test/more/test_uninheritable.rb
facets-2.5.1 test/more/test_uninheritable.rb
facets-2.4.5 test/more/test_uninheritable.rb
facets-2.5.2 test/more/test_uninheritable.rb