Skip to content

Commit

Permalink
Update failure notifiers to handle new options arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Jun 3, 2015
1 parent 199129b commit 1bd0b6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rspec/expectations/failure_aggregator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def other_errors

# This method is defined to satisfy the callable interface
# expected by `RSpec::Support.with_failure_notifier`.
def call(failure)
def call(failure, _options)
assign_backtrace(failure) unless failure.backtrace
failures << failure
end
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec/matchers/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def match(&match_block)
define_user_override(:matches?, match_block) do |actual|
begin
@actual = actual
RSpec::Support.with_failure_notifier(RAISE_METHOD) do
RSpec::Support.with_failure_notifier(RAISE_NOTIFIER) do
super(*actual_arg_for(match_block))
end
rescue RSpec::Expectations::ExpectationNotMetError
Expand All @@ -70,7 +70,7 @@ def match(&match_block)
end

# @private
RAISE_METHOD = method(:raise)
RAISE_NOTIFIER = Proc.new { |err, _opts| raise err }

# Use this to define the block for a negative expectation (`expect(...).not_to`)
# when the positive and negative forms require different handling. This
Expand Down

0 comments on commit 1bd0b6e

Please sign in to comment.