# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/proc/to_method.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/proc/to_method.rb' require 'test/unit' class TCProc < Test::Unit::TestCase def test_to_method a = 2 tproc = proc { |x| x + a } tmethod = tproc.to_method(:tryit) assert_equal( 3, tmethod.call(1) ) assert_respond_to( self, :tryit ) assert_equal( 3, tryit(1) ) end end