diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-10 17:51:40 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-10 17:51:40 +0000 |
commit | 4f6779bac7b4e294bc473782d60cbd071f0d0f8d (patch) | |
tree | d37b54da20f8c0adf2d98e810aacc8259b0602ff /test/rubygems/test_gem_source_list.rb | |
parent | 31d355aaa9436e2b24efd5e6501cabd876267c46 (diff) | |
download | ruby-4f6779bac7b4e294bc473782d60cbd071f0d0f8d.tar.gz |
* lib/rubygems: Update to RubyGems master 4bdc4f2. Important changes
in this commit:
RubyGems now chooses the test server port reliably. Patch by akr.
Partial implementation of bundler's Gemfile format.
Refactorings to improve the new resolver.
Fixes bugs in the resolver.
* test/rubygems: Tests for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_source_list.rb')
-rw-r--r-- | test/rubygems/test_gem_source_list.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_source_list.rb b/test/rubygems/test_gem_source_list.rb index e2d6da62cd..43db204a50 100644 --- a/test/rubygems/test_gem_source_list.rb +++ b/test/rubygems/test_gem_source_list.rb @@ -18,6 +18,10 @@ class TestGemSourceList < Gem::TestCase assert_equal [Gem::Source.new(@uri)], sl.sources end + def test_Enumerable + assert_includes Gem::SourceList.ancestors, Enumerable + end + def test_append sl = Gem::SourceList.new source = (sl << @uri) @@ -30,6 +34,16 @@ class TestGemSourceList < Gem::TestCase assert_equal [source], sl.sources end + def test_clear + sl = Gem::SourceList.new + + sl << 'http://source.example' + + sl.clear + + assert_empty sl + end + def test_replace sl = Gem::SourceList.new sl.replace [@uri] @@ -49,6 +63,16 @@ class TestGemSourceList < Gem::TestCase end end + def test_empty? + sl = Gem::SourceList.new + + assert_empty sl + + sl << 'http://source.example' + + refute_empty sl + end + def test_equal_to_another_list sl2 = Gem::SourceList.new sl2 << Gem::Source.new(@uri) |