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:
parent
9831875012
commit
316962d092
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue