Sha256: 255080a802c61e694cf37881b35ff350b7c0a19c00afd4b86de74442990d935a

Contents?: true

Size: 778 Bytes

Versions: 1

Compression:

Stored size: 778 Bytes

Contents

require 'paramix'
require 'test/unit'

class TC_Paramix_Nested_Bottom < Test::Unit::TestCase

  # -- fixture ------------------------------

  module M
    include Paramix::Parametric

    parameterized do |params|
      public :f do
        params[:p]
      end
    end
  end

  module N
    include M

    parameterized do |params|
      public :g do
        params[:p]
      end
    end
  end

  class I
    include N[:p => "INp"]
  end

  class E
    extend N[:p => "ENp"]
  end

  # -- tests --------------------------------

  def test_include_f
    assert_equal( "INp", I.new.f )
  end

  def test_include_g
    assert_equal( "INp", I.new.g )
  end

  def test_extend_f
    assert_equal( "ENp", E.f )
  end

  def test_extend_g
    assert_equal( "ENp", E.g )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paramix-2.0.0 test/nested/test_nested_bottom.rb