Topic: undefined method `route_for' while testing routes in my gem

Hey all,

I get the following error while testing the routes of the gem i am developing.

undefined method `route_for' for #<Spec::Example::ExampleGroup::Subclass_2:0x10354fca0>

it is happening with the following code:

describe "Scaffold::ControllerAdditions", :type => :controller do

  before(:each) do
    ActionController::Routing::Routes.draw do  |map| 
      map.add_scaffold_routes(map, :as => 'scaffolds', :path_prefix => "/beheer")
    end
  end
  it 'should recognize ma routes!' do
    route_for(:controller => "scaffolds",
              :action => "show",
              :model => "product",
              :id => 10).should ==
      {:path => "/beheer/scaffolds/product/10(.:format)",
       :method => 'get'}
    
  end
end

I dont know what to do to include the rspec routing matchers. You can use them in default with controller specs but i cant get it working in my gem specs.....

Thanks in advance!