diff options
Diffstat (limited to 'jni/ruby/test/rubygems/test_gem_unsatisfiable_dependency_error.rb')
-rw-r--r-- | jni/ruby/test/rubygems/test_gem_unsatisfiable_dependency_error.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/jni/ruby/test/rubygems/test_gem_unsatisfiable_dependency_error.rb b/jni/ruby/test/rubygems/test_gem_unsatisfiable_dependency_error.rb new file mode 100644 index 0000000..6418c5d --- /dev/null +++ b/jni/ruby/test/rubygems/test_gem_unsatisfiable_dependency_error.rb @@ -0,0 +1,32 @@ +require 'rubygems/test_case' + +class TestGemUnsatisfiableDependencyError < Gem::TestCase + + def setup + super + + @a_dep = dep 'a', '~> 1' + + @req = Gem::Resolver::DependencyRequest.new @a_dep, nil + + @e = Gem::UnsatisfiableDependencyError.new @req + end + + def test_errors + assert_equal [], @e.errors + + @e.errors << :a + + assert_equal [:a], @e.errors + end + + def test_name + assert_equal 'a', @e.name + end + + def test_version + assert_equal @a_dep.requirement, @e.version + end + +end + |