brew/Library/Homebrew/test/cmd/help_spec.rb

22 lines
535 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-02-23 06:05:26 +01:00
describe "brew", :integration_test do
describe "help" do
it "prints help for a documented Ruby command" do
expect { brew "help", "cat" }
2019-01-18 22:17:46 +05:30
.to output(/^Usage: brew cat/).to_stdout
2020-11-29 18:38:05 +01:00
.and not_to_output.to_stderr
2017-02-23 06:05:26 +01:00
.and be_a_success
end
end
describe "cat" do
it "prints help when no argument is given" do
expect { brew "cat" }
2019-01-18 22:17:46 +05:30
.to output(/^Usage: brew cat/).to_stderr
.and not_to_output.to_stdout
2017-02-23 06:05:26 +01:00
.and be_a_failure
end
end
end