mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
aa457c16d7
* Update pumactl to remove development as default environment * Extract with_config_file test helper method * Extract config file base test class, use with_env for pumactl tests
16 lines
265 B
Ruby
16 lines
265 B
Ruby
class TestConfigFileBase < Minitest::Test
|
|
private
|
|
|
|
def with_env(env = {})
|
|
original_env = {}
|
|
env.each do |k, v|
|
|
original_env[k] = ENV[k]
|
|
ENV[k] = v
|
|
end
|
|
yield
|
|
ensure
|
|
original_env.each do |k, v|
|
|
ENV[k] = v
|
|
end
|
|
end
|
|
end
|