Sha256: 7cdb11735eb65b479559d2fa9682725352c2b13732b9c72808b16c668de1313a

Contents?: true

Size: 415 Bytes

Versions: 1

Compression:

Stored size: 415 Bytes

Contents

require 'test/unit'

require 'mega/promoteself'

# fixture

  module MyModule
    extend PromoteSelf
    def self.jumble( obj, arg )
      obj + arg
    end
  end

  class String
    include MyModule
  end

# test

class TC_PromoteSelf < Test::Unit::TestCase

  def test01
    assert_equal( 'TryMe', MyModule.jumble( "Try", "Me" ) )
  end

  def test02
    assert_equal( 'TryMe', "Try".jumble( "Me" ) )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mega-0.3.1 test/tc_promoteself.rb