mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Reimplement delete environment tests (#2710)
This commit is contained in:
parent
e3acca8c26
commit
e2815b6347
1 changed files with 22 additions and 1 deletions
|
@ -439,4 +439,25 @@ class TestCLI < Minitest::Test
|
|||
ENV.delete 'APP_ENV'
|
||||
ENV.delete 'RAILS_ENV'
|
||||
end
|
||||
end
|
||||
|
||||
def test_environment_rack_env
|
||||
ENV['RACK_ENV'] = @environment
|
||||
|
||||
cli = Puma::CLI.new []
|
||||
cli.send(:setup_options)
|
||||
|
||||
assert_equal @environment, cli.instance_variable_get(:@conf).environment.call
|
||||
end
|
||||
|
||||
def test_environment_rails_env
|
||||
ENV.delete 'RACK_ENV'
|
||||
ENV['RAILS_ENV'] = @environment
|
||||
|
||||
cli = Puma::CLI.new []
|
||||
cli.send(:setup_options)
|
||||
|
||||
assert_equal @environment, cli.instance_variable_get(:@conf).environment.call
|
||||
ensure
|
||||
ENV.delete 'RAILS_ENV'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue