Sha256: c3a3f76cdbdff6b8e07d7f19ad6a027b34c26edf3a237cb616d9fe847ba3b932

Contents?: true

Size: 958 Bytes

Versions: 67

Compression:

Stored size: 958 Bytes

Contents

module WebMock
  class RequestPatternMatcher

    def initialize
      @request_execution_verifier = RequestExecutionVerifier.new
    end

    def once
      @request_execution_verifier.expected_times_executed = 1
      self
    end

    def twice
      @request_execution_verifier.expected_times_executed = 2
      self
    end

    def times(times)
      @request_execution_verifier.expected_times_executed = times.to_i
      self
    end

    def matches?(request_pattern)
      @request_execution_verifier.request_pattern = request_pattern
      @request_execution_verifier.matches?
    end

    def does_not_match?(request_pattern)
      @request_execution_verifier.request_pattern = request_pattern
      @request_execution_verifier.does_not_match?
    end

    def failure_message
      @request_execution_verifier.failure_message
    end


    def negative_failure_message
      @request_execution_verifier.negative_failure_message
    end
  end
end

Version data entries

67 entries across 67 versions & 4 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/webmock-1.8.11/lib/webmock/rspec/matchers/request_pattern_matcher.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/webmock-1.8.11/lib/webmock/rspec/matchers/request_pattern_matcher.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/webmock-1.8.11/lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.17.3 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.17.2 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.17.1 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.17.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.16.1 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.16.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.15.2 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.15.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.14.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.13.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.12.3 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.12.2 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.12.1 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.12.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.11.0 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.10.2 lib/webmock/rspec/matchers/request_pattern_matcher.rb
webmock-1.10.1 lib/webmock/rspec/matchers/request_pattern_matcher.rb