summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-03-14 10:34:33 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-03-14 10:34:33 -0700
commit6705acbd7f301d1b04388043a3dfa0308655f120 (patch)
tree1e8a43b35ef1684a4b90578f1a6374758aa7e3c7 /spec/support
parent365064280c93d519fdacbf032c0c21057e5549c9 (diff)
downloadchef-6705acbd7f301d1b04388043a3dfa0308655f120.tar.gz
chefstyle Style/AndOr fixes
this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/lib/chef/resource/cat.rb2
-rw-r--r--spec/support/lib/chef/resource/one_two_three_four.rb2
-rw-r--r--spec/support/shared/matchers/exit_with_code.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/lib/chef/resource/cat.rb b/spec/support/lib/chef/resource/cat.rb
index 94190e1f5b..f62db4d2cd 100644
--- a/spec/support/lib/chef/resource/cat.rb
+++ b/spec/support/lib/chef/resource/cat.rb
@@ -28,7 +28,7 @@ class Chef
end
def pretty_kitty(arg = nil)
- if arg == true or arg == false
+ if arg == true || arg == false
@pretty_kitty = arg
end
@pretty_kitty
diff --git a/spec/support/lib/chef/resource/one_two_three_four.rb b/spec/support/lib/chef/resource/one_two_three_four.rb
index d46d20d2b5..e46bede0fa 100644
--- a/spec/support/lib/chef/resource/one_two_three_four.rb
+++ b/spec/support/lib/chef/resource/one_two_three_four.rb
@@ -27,7 +27,7 @@ class Chef
end
def something(arg = nil)
- if arg == true or arg == false
+ if arg == true || arg == false
@something = arg
end
@something
diff --git a/spec/support/shared/matchers/exit_with_code.rb b/spec/support/shared/matchers/exit_with_code.rb
index c5458eea0e..a9f1af81ce 100644
--- a/spec/support/shared/matchers/exit_with_code.rb
+++ b/spec/support/shared/matchers/exit_with_code.rb
@@ -9,7 +9,7 @@ RSpec::Matchers.define :exit_with_code do |exp_code|
rescue SystemExit => e
actual = e.status
end
- actual and actual == exp_code
+ actual && actual == exp_code
end
failure_message do |block|