aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMartin Schimandl2017-10-07 23:07:31 +0200
committerMartin Schimandl2017-11-10 20:16:38 +0100
commit99b76360081ac92f75792ecea049b3dba496c659 (patch)
treeb2d8704f6f2d391b6c3de49beaabc98cbfe18f97 /Library
parentff2239509d53f86ca48330ddfc6f24fe03ba9768 (diff)
downloadbrew-99b76360081ac92f75792ecea049b3dba496c659.tar.bz2
Fix 'brew style' issues
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb2
-rw-r--r--Library/Homebrew/test/cask/cli/internal_stanza_spec.rb27
2 files changed, 14 insertions, 15 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index 411170010..05d939a4b 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -71,7 +71,7 @@ module Hbc
next
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?
puts ""
raise ArgumentError, "no such stanza '#{stanza}' on Cask '#{cask}'"
diff --git a/Library/Homebrew/test/cask/cli/internal_stanza_spec.rb b/Library/Homebrew/test/cask/cli/internal_stanza_spec.rb
index 77b065567..1599ca843 100644
--- a/Library/Homebrew/test/cask/cli/internal_stanza_spec.rb
+++ b/Library/Homebrew/test/cask/cli/internal_stanza_spec.rb
@@ -1,28 +1,27 @@
describe Hbc::CLI::InternalStanza, :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
- # TODO check result
+ # TODO: check result
end
it "raises an exception when stanza is invalid" do
- expect {
- described_class.new("invalid_stanza", "with-gpg");
- }.to raise_error(/Illegal stanza/);
+ expect do
+ described_class.new("invalid_stanza", "with-gpg")
+ end.to raise_error(/Illegal stanza/)
end
it "raises an exception when normal stanza is not present on cask" do
- command = described_class.new("caveats", "with-gpg");
- expect {
- command.run
- }.to raise_error(/no such stanza/)
+ command = described_class.new("caveats", "with-gpg")
+ expect do
+ command.run
+ end.to raise_error(/no such stanza/)
end
it "raises an exception when artifact stanza is not present on cask" do
- command = described_class.new("zap", "with-gpg");
- expect {
- command.run
- }.to raise_error(/no such stanza/)
+ command = described_class.new("zap", "with-gpg")
+ expect do
+ command.run
+ end.to raise_error(/no such stanza/)
end
end