summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_specification.rb
diff options
context:
space:
mode:
authorbronzdoc <lsagastume1990@gmail.com>2020-07-28 22:15:09 -0600
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-07-31 21:07:19 +0900
commit00bdac18cffce3fb74aa596c828a09e7d52affcd (patch)
treecaacb09ca7d02c5e821979bb9d1f099b0e98f2eb /test/rubygems/test_gem_specification.rb
parent985309ac38c212de327e419ad4a7bcf9e7b28267 (diff)
[rubygems/rubygems] Warn on duplicate dependency in a specification
https://github.com/rubygems/rubygems/commit/af3e5f7883
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3379
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r--test/rubygems/test_gem_specification.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index c4da82373a..cd00f74c93 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -3051,6 +3051,13 @@ Please report a bug if this causes problems.
end
end
+ def test_duplicate_runtime_dependency
+ expected = "WARNING: duplicate dependency [\"~> 3.0\", \"~> 3.0\"]\n"
+ assert_output nil, expected do
+ @a1.add_runtime_dependency "b", "~> 3.0", "~> 3.0"
+ end
+ end
+
def set_orig(cls)
s_cls = cls.singleton_class
s_cls.send :alias_method, :orig_unresolved_deps , :unresolved_deps