Port Homebrew::Cmd::Help

This commit is contained in:
Douglas Eichelberger 2024-03-29 18:31:39 -07:00
parent 78b259c8c6
commit d0c1af4f9e
2 changed files with 12 additions and 5 deletions

View File

@ -1,11 +1,16 @@
# typed: strict
# typed: strong
# frozen_string_literal: true
require "abstract_command"
require "help"
module Homebrew
sig { returns(T.noreturn) }
def help
module Cmd
class HelpCmd < AbstractCommand
sig { override.void }
def run
Help.help
end
end
end
end

View File

@ -1,6 +1,8 @@
# frozen_string_literal: true
RSpec.describe "brew", :integration_test do
require "cmd/help"
RSpec.describe Homebrew::Cmd::HelpCmd, :integration_test do
describe "help" do
it "prints help for a documented Ruby command" do
expect { brew "help", "cat" }