Created
June 4, 2010 16:46
-
-
Save jlindsey/425647 to your computer and use it in GitHub Desktop.
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
desc "Runs the test suite on the Integrity box" | |
task :integrity do | |
def exec_with_exit(command_str, put = false) | |
out = %x{#{command_str}} | |
puts out if put | |
exit($?.exitstatus) unless $? == 0 | |
end | |
ENV['PATH'] = "#{ENV['PATH']}:/usr/local/jruby/jruby-1.5.0/bin" | |
ENV['GEM_PATH'] = "#{ENV['GEM_PATH']}:/usr/local/jruby/jruby-1.5.0/lib/ruby/gems/1.8" | |
ENV['RAILS_ENV'] = 'test' | |
puts "Purging and re-migrating test database...\n" | |
exec_with_exit "rake db:test:purge" | |
exec_with_exit "rake db:migrate" | |
exec_with_exit "rake test:units", true | |
ENV['RAILS_ENV'] = 'cucumber' | |
exec_with_exit "rake cucumber", true | |
exit($?.exitstatus) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is assuming you are using:
Fork and edit accordingly for your personal setup (using RSpec instead of Test::Unit for example).