Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added failing spec for lambda with optional parameter
Browse files Browse the repository at this point in the history
tak1n committed Jun 2, 2015
1 parent dd0567e commit 4b922b0
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/ruby/core/proc/curry_spec.rb
Original file line number Diff line number Diff line change
@@ -124,6 +124,7 @@
it "raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments" do
lambda { @lambda_add.curry(4) }.should raise_error(ArgumentError)
lambda { lambda { true }.curry(1) }.should raise_error(ArgumentError)
lambda { lambda {|a, b=nil|}.curry(5) }.should raise_error(ArgumentError)
end

it "calls the curried proc with the arguments if _arity_ arguments have been given" do
1 change: 1 addition & 0 deletions spec/tags/ruby/core/proc/curry_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:raises an ArgumentError if called on a lambda that requires fewer than _arity_ arguments

0 comments on commit 4b922b0

Please sign in to comment.