Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Specifications with just a name correctly flunks with "not implemented" #20

Merged
merged 1 commit into from

2 participants

@rogernorling

The default lambda used in #it causes the instance_eval to fail in #run_requirement since instance_eval pass self as an argument. Using a proc solves this problem.

I tried to set up tests for this error case but the production code is to tightly integrated to write them in an easy way.

@chneukirchen
Owner

You are right, this worked in 1.8 days.

@chneukirchen chneukirchen merged commit dc7f88f into chneukirchen:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bacon.rb
View
2  lib/bacon.rb
@@ -156,7 +156,7 @@ def behaves_like(*names)
def it(description, &block)
return unless description =~ RestrictName
- block ||= lambda { should.flunk "not implemented" }
+ block ||= proc { should.flunk "not implemented" }
Counter[:specifications] += 1
run_requirement description, block
end
Something went wrong with that request. Please try again.