jnicklas/turnip — pull request #109 by paul (2013-12-28 20:58:38+00:00)
Title: Support RSpec 3.x

RSpec 3 removed the implicit `#example`, and changed `#before` blocks to yield the example (http://myronmars.to/n/dev-blog/2013/07/the-plan-for-rspec-3 "Core: DSL methods will yield the example"). This PR changes the turnip step builder to support that change.

However, this is not backwards-compatible with RSpec 2.x, so should not be merged as-is. This would probably be better as a proc passed around similar to jnicklas/capybara#1125, or as a separate release (turnip-2.0?) that would not be backwards-compatible with RSpec 2.x. I wanted to open this PR first to discuss what the favored approach would be.

Also, I have not fixed the tests related to this, it seems there is another change where turnip/rspec is aborting running './examples/ambiguous.feature', and not running all the features: [output](https://gist.github.com/paul/8164116). I'm not certain what rspec change might have caused this, however, I am using this commit with rspec 3.0.0.beta1 in a rails 4.1.0.beta app with no other issues.