Class Spec::Rails::Example::RoutingHelpers::RouteFor

  1. lib/spec/rails/example/routing_helpers.rb
Parent: Object

Methods

public class

  1. new

public instance

  1. ==

Included modules

  1. ::Spec::Rails::Example::RoutingHelpers::ParamsFromQueryString

Public class methods

new (example, options)
[show source]
# File lib/spec/rails/example/routing_helpers.rb, line 19
          def initialize(example, options)
            @example, @options = example, options
          end

Public instance methods

== (expected)
[show source]
# File lib/spec/rails/example/routing_helpers.rb, line 23
          def ==(expected)
            if Hash === expected
              path, querystring = expected[:path].split('?')
              path = expected.merge(:path => path)
            else
              path, querystring = expected.split('?')
            end
            params = querystring.blank? ? {} : @example.params_from_querystring(querystring)
            @example.assert_recognizes(@options, path, params)
            true
          end