aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_source_local.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
commit1daa0b113d853bfa57b776cc569939b61ca14292 (patch)
treef8c4acb08a551820299dff2b13966d6ac38d31e4 /test/rubygems/test_gem_source_local.rb
parent85995e88d49c442b5b113c2676456133e79f5c02 (diff)
downloadruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems Restored concurrent requires Fixed installing gems with extensions with --install-dir Fixed `gem fetch -v` to install the latest version Fixed installing gems with "./" in their files entries * test/rubygems/test_gem_package.rb: Tests for the above. * NEWS: Updated for RubyGems 2.1.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_source_local.rb')
-rw-r--r--test/rubygems/test_gem_source_local.rb37
1 files changed, 7 insertions, 30 deletions
diff --git a/test/rubygems/test_gem_source_local.rb b/test/rubygems/test_gem_source_local.rb
index b3b444ccde..54ce3d51be 100644
--- a/test/rubygems/test_gem_source_local.rb
+++ b/test/rubygems/test_gem_source_local.rb
@@ -1,5 +1,5 @@
require 'rubygems/test_case'
-require 'rubygems/source/local'
+require 'rubygems/source_local'
require 'fileutils'
@@ -66,41 +66,18 @@ class TestGemSourceLocal < Gem::TestCase
assert_equal s, @a
end
- def test_inspect
- assert_equal '#<Gem::Source::Local specs: "NOT LOADED">', @sl.inspect
-
- @sl.load_specs :released
-
- inner = [@a, @ap, @b].map { |t| t.name_tuple }.inspect
-
- assert_equal "#<Gem::Source::Local specs: #{inner}>", @sl.inspect
- end
-
def test_download
path = @sl.download @a
assert_equal File.expand_path(@a.file_name), path
end
- def test_spaceship
- a1 = quick_gem 'a', '1'
- util_build_gem a1
+ def test_compare
+ uri = URI.parse "http://gems.example/foo"
+ s = Gem::Source.new uri
- remote = Gem::Source.new @gem_repo
- specific = Gem::Source::SpecificFile.new a1.cache_file
- installed = Gem::Source::Installed.new
- local = Gem::Source::Local.new
-
- assert_equal( 0, local. <=>(local), 'local <=> local')
-
- assert_equal(-1, remote. <=>(local), 'remote <=> local')
- assert_equal( 1, local. <=>(remote), 'local <=> remote')
-
- assert_equal( 1, installed.<=>(local), 'installed <=> local')
- assert_equal(-1, local. <=>(installed), 'local <=> installed')
-
- assert_equal(-1, specific. <=>(local), 'specific <=> local')
- assert_equal( 1, local. <=>(specific), 'local <=> specific')
+ assert_equal(-1, (@sl <=> s))
+ assert_equal 1, (s <=> @sl)
+ assert_equal 0, (@sl <=> @sl)
end
-
end