My problem is that I'm trying to write functional tests to validate this functionality but nothing is working. I've looked all over the web and read lots of blog posts, but I can't find anything covering the new way Rails does routing. I've tried:
All I get back is null - and I can't find documentation for the recognize method anywhere.
The code in my test is shown below:
require 'test/helper' ActionController::Routing::Routes = Caesar::Query::Set.new ActionController::Routing::RouteSet::Mapper.send :include, Caesar::Live class LiveQueriesTest < Test::Unit::TestCase #:nodoc: def setup ActionController::Routing::Routes.draw do |map| map.queries end end def test_live_queries puts ActionController::Routing:Routes.named_routes[:read].recognize('photos(name,thumbnail)', :action => 'read', :qualifiers => 'ssid/:ssid', :method => :get) end end
The puts call displays nil. Any help would be greatly appreciated.