class RR::Integrations::RSpec::InvocationMatcher

Private Class Methods

new(method = nil) click to toggle source
# File lib/rr/integrations/rspec/invocation_matcher.rb, line 7
def initialize(method = nil)
  @verification = nil
  @subject = nil
  method_missing(method) if method
end

Private Instance Methods

matches?(subject) click to toggle source
# File lib/rr/integrations/rspec/invocation_matcher.rb, line 13
def matches?(subject)
  @verification.subject = subject
  calls = RR::Space.instance.recorded_calls
  if error = calls.match_error(@verification)
    @failure_message = error.message
    false
  else
    true
  end
end
method_missing(method_name, *args, &block) click to toggle source
Calls superclass method
# File lib/rr/integrations/rspec/invocation_matcher.rb, line 28
def method_missing(method_name, *args, &block)
  if @verification
    @verification.send(method_name, *args)
  else
    @verification = super
  end
  self
end
nil?() click to toggle source
# File lib/rr/integrations/rspec/invocation_matcher.rb, line 24
def nil?
  false
end