1
0
Fork 0
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:
Jacob Herrington 2021-09-22 11:24:45 -05:00 committed by GitHub
parent e3acca8c26
commit e2815b6347
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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