class WebMock::WebMockMatcher
Public Class Methods
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 6 def initialize(method, uri) @request_execution_verifier = RequestExecutionVerifier.new @request_execution_verifier.request_pattern = RequestPattern.new(method, uri) end
Public Instance Methods
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 21 def at_least_once @request_execution_verifier.at_least_times_executed = 1 self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 31 def at_least_times(times) @request_execution_verifier.at_least_times_executed = times self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 26 def at_least_twice @request_execution_verifier.at_least_times_executed = 2 self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 62 def description @request_execution_verifier.description end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 50 def does_not_match?(webmock) @request_execution_verifier.does_not_match? end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 54 def failure_message @request_execution_verifier.failure_message end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 58 def failure_message_when_negated @request_execution_verifier.failure_message_when_negated end
Also aliased as: negative_failure_message
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 46 def matches?(webmock) @request_execution_verifier.matches? end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 11 def once @request_execution_verifier.expected_times_executed = 1 self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 41 def times(times) @request_execution_verifier.expected_times_executed = times.to_i self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 16 def twice @request_execution_verifier.expected_times_executed = 2 self end
Source
# File lib/webmock/rspec/matchers/webmock_matcher.rb, line 36 def with(options = {}, &block) @request_execution_verifier.request_pattern.with(options, &block) self end