Skip to content

Instantly share code, notes, and snippets.

@sstephenson
Created April 13, 2012 19:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sstephenson/2379548 to your computer and use it in GitHub Desktop.
Save sstephenson/2379548 to your computer and use it in GitHub Desktop.
# Sledgehammer approach for ^Cing rake test runs
if Rails.env.test?
if `ps -wwp #{Process.ppid}` =~ /ruby/
trap("INT") {
Process.kill("KILL", Process.ppid)
Process.kill("KILL", Process.pid)
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment