toamitkumar's Code Blog

Ruby, Rails, RubyMotion, Chef, Puppet, Play and others. Opinions expressed here are my own and do not reflect those of my employer.

Adding Routes to Rails3 - Rspec2 (Controller Tests)

| Comments

I was working on migrating an existing Rails 2 app to Rails 3. And I came across a weird issue. All my controller specs started to fail with error - route not found even though all my routes were in place.

After some more reading in the rails routing module - found it overwrites the routes if you open the block and pass on extra routes

Hope this will save few hours of your development :))