def ==(expected)
if Hash === expected
path, querystring = expected[:path].split('?')
path_string = path
path = expected.merge(:path => path)
else
path, querystring = expected.split('?')
path_string = path
path = { :path => path, :method => :get }
end
params = querystring.blank? ? {} : Rack::Utils.parse_query(querystring).symbolize_keys!
begin
@example.assert_routing(path, @options, {}, params)
true
rescue ActionController::RoutingError, ::Test::Unit::AssertionFailedError => e
raise e.class, "#{e}\nIf you're expecting this failure, we suggest {:#{path[:method]}=>\"#{path[:path]}\"}.should_not be_routable"
end
end