[rspec-users] Troubles with route_for
lists at ruby-forum.com
Mon Jan 11 01:56:48 EST 2010
Amit Kulkarni wrote:
> Nick Hoffman wrote:
>> Hey guys. I'm having some trouble with a route spec. In routes.rb , I
>> map.connect 'foods/search/:name', :controller => :foods, :action =>
>> foods_controller_spec.rb has: http://codepad.org/dg3FERKw
>> Unfortunately, that fails: http://codepad.org/lck4r1S0
>> After reading the rspec-rails 1.2.0 upgrade notes (http://tr.im/K1zx), I
>> haven't been able to figure out what I'm doing wrong. Any hints?
>> PS: I'm using 1.2.9 and Rails 2.3.4 .
> Hi Nick,
> You need to add quotes while writing in routs.rb file.
> So your route will be define as :
> map.connect 'foods/search/:name', :controller => 'foods', :action =>
> Now try running the code again.You will see it pass.
Thanks for the suggestion, Amit. I changed the symbols to strings.
Unfortunately, the same error is still occurring:
Posted via http://www.ruby-forum.com/.
More information about the rspec-users