Permalink
Browse files

Fixed Rake TestTask shortcircuiting

  • Loading branch information...
1 parent 8661741 commit 84377a861ddbf6cc1b758438ac6131303f54e1fc @burke committed Sep 16, 2012
Showing with 9 additions and 8 deletions.
  1. +9 −8 rubygem/lib/zeus/rails.rb
View
@@ -30,13 +30,15 @@ def _monkeypatch_rake
def define
desc "Run tests" + (@name==:test ? "" : " for #{@name}")
task @name do
- Rake::FileUtilsExt.verbose(@verbose) do
- # ruby "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}"
- prev = ENV['RAILS_ENV']
- ENV['RAILS_ENV'] = nil
- sh "zeus test #{file_list_string}"
- ENV['RAILS_ENV'] = prev
- end
+ # ruby "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}"
+ rails_env = ENV['RAILS_ENV']
+ rubyopt = ENV['RUBYOPT']
+ ENV['RAILS_ENV'] = nil
+ ENV['RUBYOPT'] = nil # bundler sets this to require bundler :|
+ puts "zeus test #{file_list_string}"
+ system "zeus test #{file_list_string}"
+ ENV['RAILS_ENV'] = rails_env
+ ENV['RUBYOPT'] = rubyopt
end
self
end
@@ -91,7 +93,6 @@ def development_environment
def prerake
require 'rake'
- load 'Rakefile'
end
def rake

0 comments on commit 84377a8

Please sign in to comment.