Sha256: c3f41ff77e6ce0e190b4f73a71168016581bf4bcd0186c8cdf379321b5856b6e

Contents?: true

Size: 403 Bytes

Versions: 6

Compression:

Stored size: 403 Bytes

Contents

require 'facets/instance_function'
require 'test/unit'

# fixture

module MyModule
  instance_function

  def self.jumble( obj, arg )
    obj + arg
  end
end

class String
  include MyModule
end

# test

class TC_Instantise < 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

6 entries across 6 versions & 1 rubygems

Version Path
facets-2.8.4 test/more/test_instance_function.rb
facets-2.8.3 test/more/test_instance_function.rb
facets-2.8.2 test/more/test_instance_function.rb
facets-2.8.1 test/more/test_instance_function.rb
facets-2.8.0 test/more/test_instance_function.rb
facets-2.7.0 test/more/test_instance_function.rb