Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Created April 20, 2012 19:14
Show Gist options
  • Save johnbintz/2431132 to your computer and use it in GitHub Desktop.
Save johnbintz/2431132 to your computer and use it in GitHub Desktop.
Run flay on your Cucumber steps after a successful run
# run flay on your cucumber steps after a successful run. prevent bloat and
# promote reusability!
flay_exception = nil
flay_level = 32 # set me to a minimum sane level. don't go nuts refactoring!
# code should be cleaner when you're done, not become spaghetti.
After do |s|
flay_exception ||= s.exception
end
at_exit do
system %{flay -m #{flay_level} features/step_definitions/**/*.rb} if !flay_exception
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment