Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Rake TestTask shortcircuiting

  • Loading branch information...
commit 84377a861ddbf6cc1b758438ac6131303f54e1fc 1 parent 8661741
@burke authored
Showing with 9 additions and 8 deletions.
  1. +9 −8 rubygem/lib/zeus/rails.rb
View
17 rubygem/lib/zeus/rails.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.