Reputation: 1156
I am trying to build a test suite using Rspec and I have always a "Stack Level too deep" failure message, whatever the test that I try to run.
I am using Rails 3.0.5 and Rspec 2.0.1
To make it very simple, I just made a simple test:
it "should show home page" do
visit root_path
response.should be_success
end
Testing ONLY this test file using:
rspec ./spec/requests/simple_test.rb
gives me the "Stack level too deep" error.
The root path is for now just a simple home page that says "this is the home page" and it works fine in a browser. Moreover, the test.log file shows that the request has been processed and gave a 200 OK answer ... still the test fails "visit root_path: stack level too deep...
Anyone knows what is happening? I have searched the web and found many answers for which there was an infinite recursion but here ??? ...
A last precision: a few months ago, I did not have this problem .. since then, I installed devise (version 1.5.3) ... but here, I do not make any call to neither devise, nor user controllers, so what could cause this behaviour ?
Many thanks in advance for any clue... I don't know how to tackle or debug this.
Upvotes: 2
Views: 634
Reputation: 1156
The problem is a bug in webrat:
Webrat 0.7.3 or 0.7.2 causes "Stack level too deep" error when used with Rspec 2.0.1.
Downgrading to webrat 0.7.1 fixed the issue
More explanations there: http://www.backdrifter.com/2010/11/07/stack-level-too-deep-with-rspec-2-and-webrat/
Upvotes: 2