rspec/rspec-rails — pull request #1261 by cupakromer (2014-12-28 15:52:42+00:00)
Title: Improve feature ux

Handle feature specs without Capybara.

When Capybara has not been loaded the RSpec suite fails with syntax
errors on `feature` and `scenario`. While Capybara is an external gem
dependency, rspec-rails is so tightly coupled with it, necessitating
some basic support for the syntax.

This adds coverage for both the external documentation cukes and the
Rails app smoke specs. To prevent RSpec from raising confusing syntax
errors when Capybara is not available we shim on top of the basic
syntax: `feature` and `scenario`. Without both of these we receive
syntax failures with basic feature specs.

Since RSpec does not support the reset of the Capybara methods / DSL the
specs are skipped by default. A helpful message about using Capybara is
displayed when skipped.

Updates the cuke to match changes from #1231. This uses the `RSpec`
namespace for calling `feature`. It also adds the `:type => :feature`
metadata. rspec-rails needs to hook into feature example groups, this
change ensures that happens by setting the appropriate `:type`.

While Capybara does include the `:type` metadata automatically it may
not always. Most of the Capybara related hooks actually rely on the
metadata: `:capybara_feature => true`.

/cc @rspec/rspec