Sha256: 57a57879b5546da4b08f05f6bf39bc853682e6122625f3a97a04a66b4a2abcc1

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

# Test lib/facets/curry.rb

require 'facets/curry.rb'
require 'test/unit'

class TestCurry < Test::Unit::TestCase

  def setup
    @p = Proc.new{ |a,b,c| a + b + c }
  end

  def test_first
    n = @p.curry(__,2,3)
    assert_equal( 6, n[1] )
  end

  def test_second
    n = @p.curry(1,__,3)
    assert_equal( 6, n[2] )
  end

  def test_third
    n = @p.curry(1,2,__)
    assert_equal( 6, n[3] )
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facets-2.1.3 test/unit/test_curry.rb
facets-2.2.0 test/unit/test_curry.rb
facets-2.2.1 test/unit/test_curry.rb