fedora-migrator /vendor/gems/facets-2.4.5/test/more/test_partial.rb

Language Ruby Lines 28
MD5 Hash 417381864faf9d9a2e90298b699165eb Estimated Cost $421 (why?)
Repository https://bitbucket.org/mediashelf/fedora-migrator View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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
Back to Top