Skip to content

Instantly share code, notes, and snippets.

@carhartl
Created February 5, 2011 19:28
Show Gist options
  • Save carhartl/812704 to your computer and use it in GitHub Desktop.
Save carhartl/812704 to your computer and use it in GitHub Desktop.
Cucumber + Spork + Guard
<%
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'] || 'progress'} --strict --tags ~@wip"
%>
default: --drb <%= std_opts %> features
wip: --drb --tags @wip:3 --wip features
rerun: --drb <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
guard: --drb --strict --tags ~@wip
guard 'cucumber', :profile => 'guard' do
watch(%r{features/.+\.feature})
watch(%r{features/support/.+}) { 'features' }
watch(%r{features/step_definitions/.+}) { 'features' }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment