Sha256: 5f04497b7979be5dea554528f0d63491bc306e6beba3baf62b15648949d020d6
Contents?: true
Size: 352 Bytes
Versions: 11
Compression:
Stored size: 352 Bytes
Contents
require 'facets/module/wrap_method' require 'test/unit' class Test_Module_WrapMethod < Test::Unit::TestCase def a; "A"; end wrap_method(:a) { |old| old.call + "B" } def test_wrap_method assert_equal( "AB", a ) end # wrap def b; "B"; end wrap(:b) { |old| old.call + "C" } def test_wrap assert_equal( "BC", b ) end end
Version data entries
11 entries across 11 versions & 1 rubygems