class WebMock::RequestPatternMatcher

Public Class Methods

new() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 6
def initialize
  @request_execution_verifier = RequestExecutionVerifier.new
end

Public Instance Methods

at_least_once() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 25
def at_least_once
  @request_execution_verifier.at_least_times_executed = 1
  self
end
at_least_times(times) click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 35
def at_least_times(times)
  @request_execution_verifier.at_least_times_executed = times.to_i
  self
end
at_least_twice() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 30
def at_least_twice
  @request_execution_verifier.at_least_times_executed = 2
  self
end
at_most_once() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 40
def at_most_once
  @request_execution_verifier.at_most_times_executed = 1
  self
end
at_most_times(times) click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 50
def at_most_times(times)
  @request_execution_verifier.at_most_times_executed = times.to_i
  self
end
at_most_twice() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 45
def at_most_twice
  @request_execution_verifier.at_most_times_executed = 2
  self
end
description() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 73
def description
  @request_execution_verifier.description
end
does_not_match?(request_pattern) click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 60
def does_not_match?(request_pattern)
  @request_execution_verifier.request_pattern = request_pattern
  @request_execution_verifier.does_not_match?
end
failure_message() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 65
def failure_message
  @request_execution_verifier.failure_message
end
failure_message_when_negated() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 69
def failure_message_when_negated
  @request_execution_verifier.failure_message_when_negated
end
Also aliased as: negative_failure_message
matches?(request_pattern) click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 55
def matches?(request_pattern)
  @request_execution_verifier.request_pattern = request_pattern
  @request_execution_verifier.matches?
end
negative_failure_message()

RSpec 2 compatibility:

once() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 10
def once
  @request_execution_verifier.expected_times_executed = 1
  self
end
times(times) click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 20
def times(times)
  @request_execution_verifier.expected_times_executed = times.to_i
  self
end
twice() click to toggle source
# File lib/webmock/rspec/matchers/request_pattern_matcher.rb, line 15
def twice
  @request_execution_verifier.expected_times_executed = 2
  self
end