Fix 'brew style' issues
This commit is contained in:
parent
ff2239509d
commit
99b7636008
@ -71,7 +71,7 @@ module Hbc
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
if value == nil || (value.kind_of?(Array) && value.empty?)
|
if value.nil? || (value.is_a?(Array) && value.empty?)
|
||||||
opoo "no such stanza '#{stanza}' on Cask '#{cask}'" unless quiet?
|
opoo "no such stanza '#{stanza}' on Cask '#{cask}'" unless quiet?
|
||||||
puts ""
|
puts ""
|
||||||
raise ArgumentError, "no such stanza '#{stanza}' on Cask '#{cask}'"
|
raise ArgumentError, "no such stanza '#{stanza}' on Cask '#{cask}'"
|
||||||
|
@ -1,28 +1,27 @@
|
|||||||
describe Hbc::CLI::InternalStanza, :cask do
|
describe Hbc::CLI::InternalStanza, :cask do
|
||||||
|
|
||||||
it "shows stanza of the Specified Cask" do
|
it "shows stanza of the Specified Cask" do
|
||||||
command = described_class.new("gpg", "with-gpg");
|
command = described_class.new("gpg", "with-gpg")
|
||||||
command.run
|
command.run
|
||||||
# TODO check result
|
# TODO: check result
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises an exception when stanza is invalid" do
|
it "raises an exception when stanza is invalid" do
|
||||||
expect {
|
expect do
|
||||||
described_class.new("invalid_stanza", "with-gpg");
|
described_class.new("invalid_stanza", "with-gpg")
|
||||||
}.to raise_error(/Illegal stanza/);
|
end.to raise_error(/Illegal stanza/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises an exception when normal stanza is not present on cask" do
|
it "raises an exception when normal stanza is not present on cask" do
|
||||||
command = described_class.new("caveats", "with-gpg");
|
command = described_class.new("caveats", "with-gpg")
|
||||||
expect {
|
expect do
|
||||||
command.run
|
command.run
|
||||||
}.to raise_error(/no such stanza/)
|
end.to raise_error(/no such stanza/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "raises an exception when artifact stanza is not present on cask" do
|
it "raises an exception when artifact stanza is not present on cask" do
|
||||||
command = described_class.new("zap", "with-gpg");
|
command = described_class.new("zap", "with-gpg")
|
||||||
expect {
|
expect do
|
||||||
command.run
|
command.run
|
||||||
}.to raise_error(/no such stanza/)
|
end.to raise_error(/no such stanza/)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user