diff options
author | David RodrÃguez <[email protected]> | 2024-12-11 15:34:11 +0100 |
---|---|---|
committer | git <[email protected]> | 2024-12-11 16:18:12 +0000 |
commit | b37ab8c1232f1ae3b43050f574fdb771a1dedc5c (patch) | |
tree | 5e8b9c5e2bf69ba0af0d5836f7478f7679ad99f2 /spec | |
parent | d91ca85b970719aa2b37b8543bac544efe43ecf3 (diff) |
[rubygems/rubygems] Add missing man pages for `bundle env` and `bundle licenses` commands
https://github.com/rubygems/rubygems/commit/6e1a515d58
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/other/cli_man_pages_spec.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/spec/bundler/other/cli_man_pages_spec.rb b/spec/bundler/other/cli_man_pages_spec.rb index 037be35360..f99d91b3d5 100644 --- a/spec/bundler/other/cli_man_pages_spec.rb +++ b/spec/bundler/other/cli_man_pages_spec.rb @@ -2,14 +2,16 @@ RSpec.describe "bundle commands" do it "expects all commands to have a man page" do - command_names = - Dir["#{source_root}/lib/bundler/cli/*.rb"]. - grep_v(/common.rb/). - map {|file_path| File.basename(file_path, ".rb") } - - command_names.each do |command_name| - man_page = source_root.join("lib/bundler/man/bundle-#{command_name}.1.ronn") - expect(man_page).to exist + Bundler::CLI.all_commands.each_key do |command_name| + next if command_name == "cli_help" + + expect(man_page(command_name)).to exist end end + + private + + def man_page(command_name) + source_root.join("lib/bundler/man/bundle-#{command_name}.1.ronn") + end end |