Sha256: de071f042eecbe870b16e5affedcf132191e0316c6820b2cefac66c15b2fbaf6
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
require 'test/unit' require 'carat/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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
carats-0.3.0 | test/tc_uninheritable.rb |