Class: RSpec::Expectations::PositiveExpectationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_expectation_count/rspec_expectation_count.rb

Overview

with waiting rspec matchers, it’s not sufficient to just count the amount of times an expectation is handled. instead we need to dedupe and count each expectation exactly once (exluding retries)

this logic relies on trace points so it’s handled in the optional expectation_debug.rb file

Class Method Summary collapse

Class Method Details

.handle_matcher(*args) ⇒ Object



34
35
36
37
# File 'lib/rspec_expectation_count/rspec_expectation_count.rb', line 34

def handle_matcher(*args)
  ::RSpec::Expectations.update_expectation_count
  old_handle_matcher(*args)
end

.old_handle_matcherObject



32
# File 'lib/rspec_expectation_count/rspec_expectation_count.rb', line 32

alias_method :old_handle_matcher, :handle_matcher