diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:11:54 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:11:54 -0700 |
commit | e71560df5cebbfb209089c6255e37e65f0e34d95 (patch) | |
tree | 5cd0a1d01eb9609d7f5681b2e04faa902de67e84 /spec/unit/property_spec.rb | |
parent | 7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (diff) | |
download | chef-e71560df5cebbfb209089c6255e37e65f0e34d95.tar.gz |
Style/SymbolArray
start enforcing using %i{} instead of arrays of symbols
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/property_spec.rb')
-rw-r--r-- | spec/unit/property_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb index 7d04e38068..b2e992f8eb 100644 --- a/spec/unit/property_spec.rb +++ b/spec/unit/property_spec.rb @@ -1086,13 +1086,13 @@ describe "Chef::Resource.property" do expect do module ::PropertySpecPropertyTypes include Chef::Mixin::Properties - property_type(is: [:a, :b], default: :c) + property_type(is: %i{a b}, default: :c) end end.to raise_error(Chef::Exceptions::ValidationFailed) expect do module ::PropertySpecPropertyTypes include Chef::Mixin::Properties - property_type(is: [:a, :b], default: :b) + property_type(is: %i{a b}, default: :b) end end.not_to raise_error end @@ -1101,8 +1101,8 @@ describe "Chef::Resource.property" do before :all do module ::PropertySpecPropertyTypes include Chef::Mixin::Properties - ABType = property_type(is: [:a, :b]) - CDType = property_type(is: [:c, :d]) + ABType = property_type(is: %i{a b}) + CDType = property_type(is: %i{c d}) end end @@ -1305,7 +1305,7 @@ describe "Chef::Resource.property" do it "copies only foo when bar and name are excluded" do thing_one_resource.foo "foo" thing_one_resource.bar "bar" - thing_two_resource.copy_properties_from(thing_one_resource, exclude: [ :name, :bar ]) + thing_two_resource.copy_properties_from(thing_one_resource, exclude: %i{name bar}) expect(thing_two_resource.name).to eql("name_two") expect(thing_two_resource.foo).to eql("foo") expect(thing_two_resource.bar).to eql(nil) |