Skip to content
Snippets Groups Projects
Commit 2c854483 authored by Markus Reiter's avatar Markus Reiter
Browse files

Add test for command help strings.

parent 0f35f4ca
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ module Hbc ...@@ -14,7 +14,7 @@ module Hbc
end end
def self.help def self.help
"No help available for the #{command_name} command" nil
end end
def self.needs_init? def self.needs_init?
......
...@@ -23,6 +23,10 @@ module Hbc ...@@ -23,6 +23,10 @@ module Hbc
args.reject { |a| a.empty? || a.chars.first == "-" } args.reject { |a| a.empty? || a.chars.first == "-" }
end end
def self.help
"audit all modified Casks in a given commit range"
end
def self.usage def self.usage
<<-EOS.undent <<-EOS.undent
Usage: brew cask _audit_modified_casks [options...] <commit range> Usage: brew cask _audit_modified_casks [options...] <commit range>
......
...@@ -63,4 +63,10 @@ describe Hbc::CLI, :cask do ...@@ -63,4 +63,10 @@ describe Hbc::CLI, :cask do
described_class.process("noop") described_class.process("noop")
end end
end end
it "provides a help message for all commands" do
described_class.command_classes.each do |command_class|
expect(command_class.help).to match(/\w+/), command_class.name
end
end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment