diff options
author | Phil Dibowitz <phil@ipom.com> | 2016-08-26 17:06:54 -0700 |
---|---|---|
committer | Phil Dibowitz <phil@ipom.com> | 2016-08-26 17:07:33 -0700 |
commit | f797900d2e875dd612c6486aece5a829e4a2eb00 (patch) | |
tree | d44581feecdceebe71b19eebfbe06190a4d8cfeb | |
parent | e4e855e05dc88c4a66f04d279bafca40293fffae (diff) | |
download | chef-f797900d2e875dd612c6486aece5a829e4a2eb00.tar.gz |
Use bad style just for rspec
-rw-r--r-- | lib/chef/resource/yum_package.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/yum_package.rb b/lib/chef/resource/yum_package.rb index e73c28c4cd..1647c00337 100644 --- a/lib/chef/resource/yum_package.rb +++ b/lib/chef/resource/yum_package.rb @@ -27,8 +27,9 @@ class Chef # Install a specific arch property :arch, [ String, Array ] + # the {} on the proc here is because rspec chokes if it's do...end property :flush_cache, Hash, default: { before: false, after: false }, - coerce: proc do |v| + coerce: proc { |v| if v.is_a?(Array) v.each_with_object({}) { |arg, obj| obj[arg] = true } elsif v.any? @@ -36,7 +37,7 @@ class Chef else { before: v, after: v } end - end + } property :allow_downgrade, [ true, false ], default: false property :yum_binary, String |