Created
July 2, 2011 21:24
-
-
Save ragaskar/1061666 to your computer and use it in GitHub Desktop.
Kill spork when running rake spec (place in lib/tasks)
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
task :kill_spork do | |
spork_processes = `ps aux | grep spork | egrep -v grep | awk '{print $2}'`.split("\n") | |
spork_processes.each do |process| | |
system("kill #{process}") | |
end | |
end | |
task :spec => [:kill_spork, :cucumber] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment