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

Version Path
facets-2.8.4 test/more/test_instantiable.rb
facets-2.8.3 test/more/test_instantiable.rb
facets-2.8.2 test/more/test_instantiable.rb
facets-2.8.1 test/more/test_instantiable.rb
facets-2.8.0 test/more/test_instantiable.rb
facets-2.7.0 test/more/test_instantiable.rb
facets-2.6.0 test/more/test_instantiable.rb
facets-2.4.0 test/test_instantiable.rb
facets-2.4.1 test/test_instantiable.rb
facets-2.4.3 test/more/test_instantiable.rb
facets-2.4.2 test/more/test_instantiable.rb
facets-2.4.4 test/more/test_instantiable.rb
facets-2.5.1 test/more/test_instantiable.rb
facets-2.4.5 test/more/test_instantiable.rb
facets-2.5.0 test/more/test_instantiable.rb
facets-2.5.2 test/more/test_instantiable.rb