2017-10-07 21:32:40 +02:00
|
|
|
describe Hbc::CLI::InternalStanza, :cask do
|
|
|
|
it "shows stanza of the Specified Cask" do
|
2017-10-07 23:07:31 +02:00
|
|
|
command = described_class.new("gpg", "with-gpg")
|
2017-10-07 21:32:40 +02:00
|
|
|
command.run
|
2017-10-07 23:07:31 +02:00
|
|
|
# TODO: check result
|
2017-10-07 21:32:40 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it "raises an exception when stanza is invalid" do
|
2017-10-07 23:07:31 +02:00
|
|
|
expect do
|
|
|
|
described_class.new("invalid_stanza", "with-gpg")
|
|
|
|
end.to raise_error(/Illegal stanza/)
|
2017-10-07 21:32:40 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it "raises an exception when normal stanza is not present on cask" do
|
2017-10-07 23:07:31 +02:00
|
|
|
command = described_class.new("caveats", "with-gpg")
|
|
|
|
expect do
|
|
|
|
command.run
|
|
|
|
end.to raise_error(/no such stanza/)
|
2017-10-07 21:32:40 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
it "raises an exception when artifact stanza is not present on cask" do
|
2017-10-07 23:07:31 +02:00
|
|
|
command = described_class.new("zap", "with-gpg")
|
|
|
|
expect do
|
|
|
|
command.run
|
|
|
|
end.to raise_error(/no such stanza/)
|
2017-10-07 21:32:40 +02:00
|
|
|
end
|
|
|
|
end
|