aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-06-04 20:15:52 +0100
committerJon Leighton <j@jonathanleighton.com>2011-06-04 23:47:03 +0100
commitcdce7ff191313bd99a31d26ddca5a5c8be766695 (patch)
treef9cd76b3c14a1057a45f3cf031389f9fca0c0f4c /railties/test
parent1c527afe878a4421241ec5a68b67646b3d730335 (diff)
downloadrails-cdce7ff191313bd99a31d26ddca5a5c8be766695.tar.gz
rails-cdce7ff191313bd99a31d26ddca5a5c8be766695.tar.bz2
rails-cdce7ff191313bd99a31d26ddca5a5c8be766695.zip
Force RAILS_ENV=development in rackup_test.rb. This fixes a problem on 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.
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/rackup_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/application/rackup_test.rb b/railties/test/application/rackup_test.rb
index b0a9925890..885355fd46 100644
--- a/railties/test/application/rackup_test.rb
+++ b/railties/test/application/rackup_test.rb
@@ -11,10 +11,16 @@ module ApplicationTests
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