New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack level too deep with engines #63

Closed
radar opened this Issue Feb 24, 2011 · 5 comments

Comments

Projects
None yet
2 participants
@radar

radar commented Feb 24, 2011

I'm trying to build an engine http://github.com/radar/forem/tree/broken using RSpec and it gives a "Stack level too deep" on an undefined method when I run bundle exec rspec spec/integration. This is because the forum_path method is undefined, but it also happens with any other undefined method.

The problem is that you get a stack trace like this:

.../gems/rspec-expectations-2.5.0/lib/rspec/matchers/method_missing.rb:9:in `method_missing'
.../gems/rails-5f1fc0c8ac6e/actionpack/lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'
.../gems/rails-5f1fc0c8ac6e/actionpack/lib/action_dispatch/testing/integration.rb:378:in `method_missing'
.../gems/rspec-expectations-2.5.0/lib/rspec/matchers/method_missing.rb:9:in `method_missing'
..........

As you can see here, it's in an infinite loop, causing the stack level too deep error. I'm interested in any insight that can be offered on this.

@myronmarston

This comment has been minimized.

Member

myronmarston commented Feb 24, 2011

This was happening at one point and I fixed it:

44909b0

I'm surprised a similar thing is happening again. I'll try to take a look when I get a chance. To repro, should I just clone your repo, checkout the broken branch, bundle install and run bundle exec rspec spec/integration?

@radar

This comment has been minimized.

radar commented Feb 24, 2011

Thank you for the quick response Myron,

Yes, just clone, checkout, bundle and exec will get you to the same stage I'm at.

@myronmarston

This comment has been minimized.

Member

myronmarston commented Feb 24, 2011

I've found that if you comment out your include RSpec::Matchers line from your integration example group module, it fixes the problem.

There's a deeper problem here (including RSpec::Matchers should not have that effect), but I haven't been able to get to the root cause of it yet.

Let's keep this open for now as I continue to investigate it.

@radar

This comment has been minimized.

radar commented Feb 24, 2011

Oh neat! Thanks Myron, and good luck finding the root cause.

@myronmarston

This comment has been minimized.

Member

myronmarston commented Feb 27, 2011

Prevent SystemStackError on 1.9 when users include RSpec::Matchers in an example group.

Closed by 80e5300.

kchien pushed a commit to kchien/rspec-expectations that referenced this issue Mar 7, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment