aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_dependency_resolution_error.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-10 17:51:40 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-10 17:51:40 +0000
commit4f6779bac7b4e294bc473782d60cbd071f0d0f8d (patch)
treed37b54da20f8c0adf2d98e810aacc8259b0602ff /test/rubygems/test_gem_dependency_resolution_error.rb
parent31d355aaa9436e2b24efd5e6501cabd876267c46 (diff)
downloadruby-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_dependency_resolution_error.rb')
-rw-r--r--test/rubygems/test_gem_dependency_resolution_error.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_dependency_resolution_error.rb b/test/rubygems/test_gem_dependency_resolution_error.rb
new file mode 100644
index 0000000000..7f8cf0c5cc
--- /dev/null
+++ b/test/rubygems/test_gem_dependency_resolution_error.rb
@@ -0,0 +1,28 @@
+require 'rubygems/test_case'
+
+class TestGemDependencyResolutionError < Gem::TestCase
+
+ def setup
+ super
+
+ @DR = Gem::DependencyResolver
+
+ @spec = quick_spec 'a', 2
+
+ @a1_req = @DR::DependencyRequest.new dep('a', '= 1'), nil
+ @a2_req = @DR::DependencyRequest.new dep('a', '= 2'), nil
+
+ @activated = @DR::ActivationRequest.new @spec, @a2_req
+
+ @conflict = @DR::DependencyConflict.new @a1_req, @activated
+
+ @error = Gem::DependencyResolutionError.new @conflict
+ end
+
+ def test_message
+ assert_match %r%^conflicting dependencies a \(= 1\) and a \(= 2\)$%,
+ @error.message
+ end
+
+end
+