[rspec-users] undefined method `route_for

Amit Kulkarni lists at ruby-forum.com
Wed Nov 11 04:42:47 EST 2009

Thanks David for the information but still i am getting the same error.
What i have done is:
I have home controller.
now i am writing route scenarios in home_controller_spec.rb which is 
under spec/controllers directory

I tried your code which looks like as

describe "route generation", :type => :HomeController do
    it "should map { :controller => 'home', :action => 'index' } to 
/home" do
      route_for(:controller => 'home', :action => 'index').should == 

    it "should map { :controller => 'home' } RESTfully" do
      params_from( :get, '/home' ).should == { :controller => 'home', 
:action => 'index' }

But it is not working,i know i am missing something.

Also can you explain the first point?
Can you tell me up what i need to add to get it running atleast :-)
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list