Created
June 6, 2012 14:58
-
-
Save mattscilipoti/2882391 to your computer and use it in GitHub Desktop.
cucumber.yml that moves rerun.txt to tmp (DRYly)
This file contains hidden or 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
<% | |
# vars for default formats. These are overridden by command line args.default_format_multi = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'}" | |
default_format_single = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}" | |
html_report_options = " --format html --out='public/reports/features.html'" | |
# Use tmp dir for rerun.txt (vs. root) | |
rerun_file = File.join('tmp', 'rerun.txt') | |
rerun = File.file?(rerun_file) ? IO.read(rerun_file) : "" | |
rerun_format = "--format rerun --out #{ rerun_file }" | |
rerun_opts = rerun.to_s.strip.empty? ? "#{default_format_multi} features" : "#{default_format_single} #{rerun}" | |
std_opts = "#{default_format_multi} #{rerun_format} --strict --tags ~@wip --tags ~@demo" | |
%> | |
rerun: <%= rerun_opts %> <%= rerun_format %> --strict --tags ~@wip | |
default: <%= std_opts %> features | |
demo: --tags @demo features | |
wip: --tags @wip:3 --wip features | |
html_report: <%=default_format_multi %> <%=html_report_options %> features |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment