Sha256: d9264b084b51b37d73e4a51259c77613ae57abbaab9cba1bda9803d58d6f3467

Contents?: true

Size: 443 Bytes

Versions: 4

Compression:

Stored size: 443 Bytes

Contents

covers 'facets/proc/partial'

tests Proc do

  unit :partial => "first argument" do
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(NA,2,3)
    n[1].assert == 6
  end

  unit :partial => "second argument" do
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(1,NA,3)
    n[2].assert == 6
  end

  unit :partial => "third argument" do
    f = Proc.new{ |a,b,c| a + b + c }
    n = f.partial(1,2,NA)
    n[3].assert == 6
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
facets-2.9.1 test/core/proc/test_partial.rb
facets-2.9.0 test/core/proc/test_partial.rb
facets-2.9.0.pre.2 test/core/proc/test_partial.rb
facets-2.9.0.pre.1 test/core/proc/test_partial.rb