summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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