Skip to content

Instantly share code, notes, and snippets.

@niklas
Created May 4, 2012 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niklas/2593996 to your computer and use it in GitHub Desktop.
Save niklas/2593996 to your computer and use it in GitHub Desktop.
Pause a cucumber scenario and ask for pry
When /^I pause|try pry|I pry|I debug$/ do
STDERR.puts "Pausing..."
if system(%Q~which zenity~)
if system(%Q~zenity --question --text="Paused. Want to pry?"~)
binding.pry
end
else
# no zenity installed, pry without asking
binding.pry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment