1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

build fix, we have to reset the RACK_ENV as well.

This is a follow-up to ded17a4 to get the build passing on Travis.
As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
This commit is contained in:
Yves Senn 2014-09-03 21:59:38 +02:00
parent 9831875012
commit 316962d092

View file

@ -176,8 +176,10 @@ module ApplicationTests
test 'db:setup loads schema and seeds database' do
begin
@old_env = ENV["RAILS_ENV"]
@old_rails_env = ENV["RAILS_ENV"]
@old_rack_env = ENV["RACK_ENV"]
ENV.delete "RAILS_ENV"
ENV.delete "RACK_ENV"
app_file 'db/schema.rb', <<-RUBY
ActiveRecord::Schema.define(version: "1") do
@ -196,7 +198,8 @@ module ApplicationTests
assert_equal "development.sqlite3", File.basename(database_path.strip)
end
ensure
ENV["RAILS_ENV"] = @old_env
ENV["RAILS_ENV"] = @old_rails_env
ENV["RACK_ENV"] = @old_rack_env
end
end
end