diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
commit | 686113531d23f30e9973d659c456ae33eb9cff1f (patch) | |
tree | f225de7251a8b49b8d183dd168bab0a0addbe23f /spec/unit/resource/resource_notification_spec.rb | |
parent | d1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff) | |
download | chef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz |
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
Diffstat (limited to 'spec/unit/resource/resource_notification_spec.rb')
-rw-r--r-- | spec/unit/resource/resource_notification_spec.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/unit/resource/resource_notification_spec.rb b/spec/unit/resource/resource_notification_spec.rb index 5ba6ea35d3..5bb3ba95ea 100644 --- a/spec/unit/resource/resource_notification_spec.rb +++ b/spec/unit/resource/resource_notification_spec.rb @@ -50,7 +50,7 @@ describe Chef::Resource::Notification do end it "raises an ArgumentError if you try to check a non-ducktype object for duplication" do - expect {notification.duplicates?(:not_a_notification)}.to raise_error(ArgumentError) + expect { notification.duplicates?(:not_a_notification) }.to raise_error(ArgumentError) end it "takes no action to resolve a resource reference that doesn't need to be resolved" do @@ -65,7 +65,7 @@ describe Chef::Resource::Notification do end it "resolves a lazy reference to a resource" do - notification.resource = {:cat => "keyboard_cat"} + notification.resource = { :cat => "keyboard_cat" } @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") @resource_collection = Chef::ResourceCollection.new @resource_collection << @keyboard_cat @@ -78,7 +78,7 @@ describe Chef::Resource::Notification do it "resolves a lazy reference to its notifying resource" do @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") notification.resource = @keyboard_cat - notification.notifying_resource = {:cat => "long_cat"} + notification.notifying_resource = { :cat => "long_cat" } @long_cat = Chef::Resource::Cat.new("long_cat") @resource_collection = Chef::ResourceCollection.new @resource_collection << @long_cat @@ -87,11 +87,11 @@ describe Chef::Resource::Notification do end it "resolves lazy references to both its resource and its notifying resource" do - notification.resource = {:cat => "keyboard_cat"} + notification.resource = { :cat => "keyboard_cat" } @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") @resource_collection = Chef::ResourceCollection.new @resource_collection << @keyboard_cat - notification.notifying_resource = {:cat => "long_cat"} + notification.notifying_resource = { :cat => "long_cat" } @long_cat = Chef::Resource::Cat.new("long_cat") @resource_collection << @long_cat notification.resolve_resource_reference(@resource_collection) @@ -100,7 +100,7 @@ describe Chef::Resource::Notification do end it "raises a RuntimeError if you try to reference multiple resources" do - notification.resource = {:cat => ["keyboard_cat", "cheez_cat"]} + notification.resource = { :cat => ["keyboard_cat", "cheez_cat"] } @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") @cheez_cat = Chef::Resource::Cat.new("cheez_cat") @resource_collection = Chef::ResourceCollection.new @@ -108,11 +108,11 @@ describe Chef::Resource::Notification do @resource_collection << @cheez_cat @long_cat = Chef::Resource::Cat.new("long_cat") notification.notifying_resource = @long_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(RuntimeError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(RuntimeError) end it "raises a RuntimeError if you try to reference multiple notifying resources" do - notification.notifying_resource = {:cat => ["long_cat", "cheez_cat"]} + notification.notifying_resource = { :cat => ["long_cat", "cheez_cat"] } @long_cat = Chef::Resource::Cat.new("long_cat") @cheez_cat = Chef::Resource::Cat.new("cheez_cat") @resource_collection = Chef::ResourceCollection.new @@ -120,27 +120,27 @@ describe Chef::Resource::Notification do @resource_collection << @cheez_cat @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") notification.resource = @keyboard_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(RuntimeError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(RuntimeError) end it "raises a RuntimeError if it can't find a resource in the resource collection when resolving a lazy reference" do - notification.resource = {:cat => "keyboard_cat"} + notification.resource = { :cat => "keyboard_cat" } @cheez_cat = Chef::Resource::Cat.new("cheez_cat") @resource_collection = Chef::ResourceCollection.new @resource_collection << @cheez_cat @long_cat = Chef::Resource::Cat.new("long_cat") notification.notifying_resource = @long_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(RuntimeError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(RuntimeError) end it "raises a RuntimeError if it can't find a notifying resource in the resource collection when resolving a lazy reference" do - notification.notifying_resource = {:cat => "long_cat"} + notification.notifying_resource = { :cat => "long_cat" } @cheez_cat = Chef::Resource::Cat.new("cheez_cat") @resource_collection = Chef::ResourceCollection.new @resource_collection << @cheez_cat @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") notification.resource = @keyboard_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(RuntimeError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(RuntimeError) end it "raises an ArgumentError if improper syntax is used in the lazy reference to its resource" do @@ -150,7 +150,7 @@ describe Chef::Resource::Notification do @resource_collection << @keyboard_cat @long_cat = Chef::Resource::Cat.new("long_cat") notification.notifying_resource = @long_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(ArgumentError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(ArgumentError) end it "raises an ArgumentError if improper syntax is used in the lazy reference to its notifying resource" do @@ -160,7 +160,7 @@ describe Chef::Resource::Notification do @resource_collection << @long_cat @keyboard_cat = Chef::Resource::Cat.new("keyboard_cat") notification.resource = @keyboard_cat - expect {notification.resolve_resource_reference(@resource_collection)}.to raise_error(ArgumentError) + expect { notification.resolve_resource_reference(@resource_collection) }.to raise_error(ArgumentError) end # Create test to resolve lazy references to both notifying resource and dest. resource |