jnicklas/turnip — pull request #131 by hanachin (2014-07-16 12:15:48+00:00)
Title: Remove deprecation warnings in rspec 2.99

When I use turnip with rspec 2.99 and capybara, I got deprecation warnings like: https://travis-ci.org/hanachin/turnip/jobs/30064779
The sample commit is here: https://github.com/hanachin/turnip/commit/e283c0046ebcc130744827eca069c75dfa801711
```
RSpec::Core::ExampleGroup#example is deprecated and will be removed
in RSpec 3. There are a few options for what you can use instead:
- rspec-core's DSL methods (`it`, `before`, `after`, `let`, `subject`, etc)
now yield the example as a block argument, and that is the recommended
way to access the current example from those contexts.
- The current example is now exposed via `RSpec.current_example`,
which is accessible from any context.
- If you can't update the code at this call site (e.g. because it is in
an extension gem), you can use this snippet to continue making this
method available in RSpec 2.99 and RSpec 3:
RSpec.configure do |c|
c.expose_current_running_example_as :example
end
(Called from /home/travis/build/hanachin/turnip/lib/turnip/capybara.rb:5:in `block (2 levels) in ')
```