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
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "abstract_command"
|
||||||
require "help"
|
require "help"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
sig { returns(T.noreturn) }
|
module Cmd
|
||||||
def help
|
class HelpCmd < AbstractCommand
|
||||||
Help.help
|
sig { override.void }
|
||||||
|
def run
|
||||||
|
Help.help
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
RSpec.describe "brew", :integration_test do
|
require "cmd/help"
|
||||||
|
|
||||||
|
RSpec.describe Homebrew::Cmd::HelpCmd, :integration_test do
|
||||||
describe "help" do
|
describe "help" do
|
||||||
it "prints help for a documented Ruby command" do
|
it "prints help for a documented Ruby command" do
|
||||||
expect { brew "help", "cat" }
|
expect { brew "help", "cat" }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user