Created
December 17, 2010 07:24
-
-
Save sarahmei/744607 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace :cruise do | |
desc "Run all specs and features" | |
task :cruise => :environment do | |
puts "Starting virtual display..." | |
`sh -e /etc/init.d/xvfb start` | |
puts "Starting specs..." | |
system('export DISPLAY=:99.0 && export SELENIUM_SERVER_PORT=53809 && bundle exec rake') | |
exit_status = $?.exitstatus | |
puts "Stopping virtual display..." | |
`sh -e /etc/init.d/xvfb stop` | |
raise "tests failed!" unless exit_status == 0 | |
end | |
end | |
task :cruise => "cruise:cruise" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment