Permalink
Browse files

Force RAILS_ENV=development in rackup_test.rb. This fixes a problem o…

…n the CI server. For some reason the RAILS_ENV on the CI server is production, which means that the ActionDispatch::Static middleware is not used, and so the request in 'config.ru can be racked up' returns a 404 rather than a 200.
  • Loading branch information...
1 parent 3939fbd commit f9464a28d217aed1a8897cf6bff57732f24eded2 @jonleighton jonleighton committed Jun 4, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 railties/test/application/rackup_test.rb
@@ -11,10 +11,16 @@ def rackup
end
def setup
+ @prev_rails_env = ENV['RAILS_ENV']
+ ENV['RAILS_ENV'] = 'development'
build_app
boot_rails
end
+ def teardown
+ ENV['RAILS_ENV'] = @prev_rails_env
+ end
+
test "rails app is present" do
assert File.exist?(app_path("config"))
end

0 comments on commit f9464a2

Please sign in to comment.