Port Homebrew::Cmd::Help
This commit is contained in:
parent
78b259c8c6
commit
d0c1af4f9e
@ -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
|
||||
|
||||
@ -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" }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user