On Wednesday, April 25, 2012 at 10:59 PM, Will Marshall wrote: > Hey guys, > > I'm having a very tricky issue with the route matching in RSpec 2 > (2.9.0) > > I recently renamed a "resources" a route using ":path =>". My tests, > which were working before this change, are no longer able to recognize > the renamed route. > > I've prepared a test-case illustrating the problem here: > https://gist.github.com/2495632 > > In a nutshell, I *always* get "No route matches > {:controller=>"health_quotes"}" even though A: I can access > health_quotes_url from within the spec, and B: I can do > Rails.application.routes.recognize_path("/health-insurance", :method > => :get) and get valid routes. > > All the routes work as expected when I run Webrick, and on the staging > server. > > Does anyone have a clue what's going on here? Am I missing something > obvious, or is RSpec's route matching borked? > >
There is no "RSpec's route matching" - the `get` method comes from the Rails test framework which rspec-rails exposes but generally doesn't intercept (there are exceptions, but not related to `get`). Try doing the same in a Rails' functional test and let us know if you see any different behavior. Cheers, David -- You received this message because you are subscribed to the Google Groups "rspec" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rspec?hl=en.
