Sha256: 05de6b8d8ee291e4d39ec0d16fbf1aa6c2a255a9c6ae4dc53c10565891a6b594

Contents?: true

Size: 493 Bytes

Versions: 13

Compression:

Stored size: 493 Bytes

Contents

# Test lib/more/ext/facets/proc/partial.rb

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

class TestProcPartial < Test::Unit::TestCase

  def test_first
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(__,2,3)
    assert_equal( 6, n[1] )
  end

  def test_second
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(1,__,3)
    assert_equal( 6, n[2] )
  end

  def test_third
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(1,2,__)
    assert_equal( 6, n[3] )
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
facets-2.8.4 test/more/test_partial.rb
facets-2.8.3 test/more/test_partial.rb
facets-2.8.2 test/more/test_partial.rb
facets-2.8.1 test/more/test_partial.rb
facets-2.8.0 test/more/test_partial.rb
facets-2.7.0 test/more/test_partial.rb
facets-2.6.0 test/more/test_partial.rb
facets-2.4.3 test/more/test_partial.rb
facets-2.4.4 test/more/test_partial.rb
facets-2.5.1 test/more/test_partial.rb
facets-2.4.5 test/more/test_partial.rb
facets-2.5.0 test/more/test_partial.rb
facets-2.5.2 test/more/test_partial.rb