Sha256: 699acf5cae70ac5847ab46c52f2b7d13a994c06c4bf3a96e8cbfa857f54a3874
Contents?: true
Size: 449 Bytes
Versions: 16
Compression:
Stored size: 449 Bytes
Contents
require 'facets/instantiable.rb' require 'test/unit' class TestInstantiable < Test::Unit::TestCase module M extend Instantiable attr :a def initialize( a ) @a = a end end module N include Instantiable attr :a def initialize( a ) @a = a end end def test_m_new m = M.new( 1 ) assert_equal( 1, m.a ) end def test_n_new m = N.new( 1 ) assert_equal( 1, m.a ) end end
Version data entries
16 entries across 16 versions & 1 rubygems