-
-
Notifications
You must be signed in to change notification settings - Fork 931
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move HOST_DISPLAY config into rubygems.yml
Remove unused env in rubygems.yml
- Loading branch information
1 parent
9a7a35c
commit 38e184e
Showing
3 changed files
with
33 additions
and
11 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,28 @@ | ||
require "test_helper" | ||
|
||
# These tests just spot check to make sure config is loaded correctly and the file is not broken or missing | ||
class GemcutterConfigTest < ActiveSupport::TestCase | ||
context "Gemcutter.config[:host_display]" do | ||
should "be set for test environment" do | ||
assert_equal "RubyGems.org", Gemcutter.config[:host_display] | ||
end | ||
|
||
should "have a setting for each regularly used environment" do | ||
assert_equal "RubyGems.org", Gemcutter::Application.config_for(:rubygems, env: "development").fetch(:host_display) | ||
assert_equal "RubyGems.org", Gemcutter::Application.config_for(:rubygems, env: "production").fetch(:host_display) | ||
assert_equal "RubyGems.org Staging", Gemcutter::Application.config_for(:rubygems, env: "staging").fetch(:host_display) | ||
end | ||
end | ||
|
||
context "Gemcutter.config[:host]" do | ||
should "be set for test environment" do | ||
assert_equal "localhost", Gemcutter.config[:host] | ||
end | ||
|
||
should "have a setting for each regularly used environment" do | ||
assert_equal "localhost", Gemcutter::Application.config_for(:rubygems, env: "development").fetch(:host) | ||
assert_equal "rubygems.org", Gemcutter::Application.config_for(:rubygems, env: "production").fetch(:host) | ||
assert_equal "staging.rubygems.org", Gemcutter::Application.config_for(:rubygems, env: "staging").fetch(:host) | ||
end | ||
end | ||
end |