Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/chefspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module ChefSpec
# @return [self]
#
def define_matcher(resource_name)
matchers[resource_name.to_sym] = Proc.new do |identity|
matchers[resource_name.to_sym] = proc do |identity|
find_resource(resource_name, identity)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chefspec/matchers/notifications_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def matches?(resource)
@resource = resource

if @resource
block = Proc.new do |notified|
block = proc do |notified|
resource_name(notified.resource).to_s == @expected_resource_type &&
(@expected_resource_name === notified.resource.identity.to_s || @expected_resource_name === notified.resource.name.to_s) &&
matches_action?(notified)
Expand Down
2 changes: 1 addition & 1 deletion lib/chefspec/stubs/stub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def and_return(value)
end

def and_raise(exception)
@block = Proc.new { raise exception }
@block = proc { raise exception }
self
end

Expand Down
Loading