Skip to content

Instantly share code, notes, and snippets.

@theycallmeswift
Created October 31, 2011 11:21
Show Gist options
  • Save theycallmeswift/1327304 to your computer and use it in GitHub Desktop.
Save theycallmeswift/1327304 to your computer and use it in GitHub Desktop.
Nested Cucumber Features
# Cucumber doesn't like nested features (putting them into subdirectories)
# to fix this, add the following lines to config/cucumber.yml:
# --require features/step_definitions --require features/support
# SOURCE: http://collectiveidea.com/blog/archives/2010/09/13/practical-cucumber-organization/
<%
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip --require features/step_definitions --require features/support"
%>
default: <%= std_opts %> features
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment