Created
August 14, 2013 05:53
-
-
Save kaievns/6228359 to your computer and use it in GitHub Desktop.
How to enable nested `feature` constructions in the `rspec` features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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