-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pumactl to remove development as default environment (puma#2035)
* 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
- Loading branch information
1 parent
317c122
commit e26c03b
Showing
5 changed files
with
88 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters