summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2025-08-12 19:19:31 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-09-03 23:38:37 +0900
commit6a93a28c6987d443d4cd54b2eea1ea70b9823ff5 (patch)
treef9524358cc23e4f9bc55edf9c3da75b1f84db202
parentac94fb77b97e17c1b2fcd9ab446fc1384c97207e (diff)
[rubygems/rubygems] Ensure removed commands get their docs removed, too
https://github.com/rubygems/rubygems/commit/2a2e45bbe9
-rw-r--r--spec/bundler/other/cli_man_pages_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/bundler/other/cli_man_pages_spec.rb b/spec/bundler/other/cli_man_pages_spec.rb
index 6efd2904d6..f656010659 100644
--- a/spec/bundler/other/cli_man_pages_spec.rb
+++ b/spec/bundler/other/cli_man_pages_spec.rb
@@ -13,9 +13,11 @@ RSpec.describe "bundle commands" do
def check_commands!(command_class)
command_class.commands.each do |command_name, command|
- next if command.is_a?(Bundler::Thor::HiddenCommand)
-
- if command_class == Bundler::CLI
+ if command.is_a?(Bundler::Thor::HiddenCommand)
+ man_page = man_page(command_name)
+ expect(man_page).not_to exist
+ expect(main_man_page.read).not_to include("bundle #{command_name}")
+ elsif command_class == Bundler::CLI
man_page = man_page(command_name)
expect(man_page).to exist
@@ -87,4 +89,8 @@ RSpec.describe "bundle commands" do
def man_page(command_name)
source_root.join("lib/bundler/man/bundle-#{command_name}.1.ronn")
end
+
+ def main_man_page
+ source_root.join("lib/bundler/man/bundle.1.ronn")
+ end
end