Sha256: 02ab77403e20febb4a393d3530609a0d7a60e8ad14c38a79a9a0cd205dcfb12e

Contents?: true

Size: 403 Bytes

Versions: 11

Compression:

Stored size: 403 Bytes

Contents

require 'facets/module/prepend'
require 'test/unit'

class Test_Module_Prepend < Test::Unit::TestCase

  module M
    def q; "qm"; end
  end

  module N
    prepend M
    def q; "qn"; end
  end

  class X
    include N
  end

  def test_prepend_module_method
    assert_equal( "qm", N.q )
  end

  # Wish this worked. 
  #def test_prepend_instance_method
  #  assert_equal( "qm", X.new.q )
  #end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/module/test_prepend.rb
facets-2.8.3 test/core/module/test_prepend.rb
facets-2.8.2 test/core/module/test_prepend.rb
facets-2.8.1 test/core/module/test_prepend.rb
facets-2.8.0 test/core/module/test_prepend.rb
facets-2.7.0 test/core/module/test_prepend.rb
facets-2.6.0 test/core/module/test_prepend.rb
facets-2.5.1 test/core/module/test_prepend.rb
facets-2.5.0 test/core/module/test_prepend.rb
facets-2.4.5 test/core/module/test_prepend.rb
facets-2.5.2 test/core/module/test_prepend.rb