Sha256: 076563f5b1e8283f50d331dbbfab1e823750a01e9abd476eff357a8c318f2529

Contents?: true

Size: 591 Bytes

Versions: 3

Compression:

Stored size: 591 Bytes

Contents

require 'test/unit'
require 'facet/uninheritable'

  ###### #####   #### ######
    ##   ##     ##      ##
    ##   ####     ##    ##
    ##   ##        ##   ##
    ##   #####  ####    ##

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

3 entries across 3 versions & 1 rubygems

Version Path
facets-0.7.0 test/tc_uninheritable.rb
facets-0.7.1 test/tc_uninheritable.rb
facets-0.7.2 test/tc_uninheritable.rb