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 1c527af commit cdce7ff191313bd99a31d26ddca5a5c8be766695 @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

2 comments on commit cdce7ff

Contributor

dmathieu commented on cdce7ff Jun 5, 2011

Shouldn't it be test instead of development ?

Member

josevalim replied Jun 5, 2011

It should be development as we are testing rackup in development works. We never really rackup in test. :)

Please sign in to comment.