Created
May 4, 2012 10:35
-
-
Save niklas/2593996 to your computer and use it in GitHub Desktop.
Pause a cucumber scenario and ask for pry
This file contains 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
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