Class/Module Index [+]

Quicksearch

Mocha::ParameterMatchers::QueryStringMatches

Parameter matcher which matches URIs with equivalent query strings.

Public Class Methods

new(uri) click to toggle source

@private

# File lib/mocha/parameter_matchers/query_string.rb, line 33
def initialize(uri)
  @uri = URI.parse(uri)
end

Public Instance Methods

matches?(available_parameters) click to toggle source

@private

# File lib/mocha/parameter_matchers/query_string.rb, line 38
def matches?(available_parameters)
  actual = explode(URI.parse(available_parameters.shift))
  expected = explode(@uri)
  actual == expected
end
mocha_inspect() click to toggle source

@private

# File lib/mocha/parameter_matchers/query_string.rb, line 45
def mocha_inspect
  "has_equivalent_query_string(#{@uri.mocha_inspect})"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.