Sha256: aa4c216e76f5a73cc52de9d2b249c8b4d02571235efcd82a891d570bd90d78be

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/proc/to_method.rb
#
# Extracted Tue Jun 20 15:12:27 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/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


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.4.2 test/lib/facets/core/proc/test_to_method.rb