summaryrefslogtreecommitdiff
path: root/test/rubygems
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-21 18:53:57 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-21 19:28:12 +0900
commit38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1 (patch)
tree8fad28ac8a5d0deecd88a2e3e33ab0212dfb6bbf /test/rubygems
parenta47e1328e662b5c095b560b842687ed1901fd7b1 (diff)
downloadruby-38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1.tar.gz
Merge rubygems/bundler master
Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5
Diffstat (limited to 'test/rubygems')
-rw-r--r--test/rubygems/test_gem_specification.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index b20e8b321a..1952192aba 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -2677,6 +2677,23 @@ duplicate dependency on c (>= 1.2.3, development), (~> 1.2) use:
end
end
+ def test_validate_self_referencing_dependencies
+ util_setup_validate
+
+ Dir.chdir @tempdir do
+ @a1.add_runtime_dependency @a1.name, "1"
+
+ use_ui @ui do
+ @a1.validate
+ end
+
+ assert_equal <<-EXPECTED, @ui.error
+#{w}: Self referencing dependency is unnecessary and strongly discouraged.
+#{w}: See https://guides.rubygems.org/specification-reference/ for help
+ EXPECTED
+ end
+ end
+
def test_validate_rake_extension_have_rake_dependency_warning
util_setup_validate