Skip to content

Instantly share code, notes, and snippets.

@kaievns
Created August 14, 2013 05:53
Show Gist options
  • Save kaievns/6228359 to your computer and use it in GitHub Desktop.
Save kaievns/6228359 to your computer and use it in GitHub Desktop.
How to enable nested `feature` constructions in the `rspec` features
#
# Put this somwehere in your `spec/support` folder, then you can do something like that
#
# feature "Stuff" do
# feature 'new' do
# scenario 'user goes in and gets awesomized' do
# end
#
# scenario 'user goes in with evil intentions and doesn't get awesomized' do
# end
# end
#
# feature 'edit' do
# scenario 'user tries to edit stuff and get awesomized again' do
# end
# end
# end
#
module Capybara::FeaturesPatch
def self.included(base)
base.instance_eval do
alias :feature :describe
end
end
end
RSpec.configuration.include Capybara::FeaturesPatch, :capybara_feature => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment