Skip to content


Using polymorphic_path throws a strange error also, not available #46

schubert opened this Issue · 2 comments

2 participants


In a controller test we had an assertion:

response.should redirect_to(polymorphic_path(@some_object))

Which resulted in the following error

Failure/Error: Unable to find matching line from backtrace stack level too deep
# ~/.rvm/gems/ruby-1.9.2-p0@gemset/gems/rspec-expectations-2.1.0/lib/rspec/matchers/method_missing.rb:4

Seems like there might be two issues here:

  1. If some_route_path method is available why isn't polymorphic path available as well? (maybe this is not the job of the expectations code)

  2. Why is it stack overflowing in method_missing? If I remove the assertion and just reduce the line to "polymorphic_path(@some_object)" I get the same thing.

This is on Rails 3.0.3 and rspec 2.1.0 and Ruby 1.9.2-p0

Let me know if you need any other details.

RSpec member

re: #2, that is a bug that's been fixed by rspec-core-2.2.1 and rspec-rails-2.2.1

re: #1, not sure but that would most likely be a rails issue. Do you get a different response from a rails functional test?

RSpec member

Having not heard back in a couple of months I'm going to close this now. If it's still a problem for you, please answer my question about getting a diff response in a functional test and I'll be glad to reopen it.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.