Skip to content
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

Running rspec hangs #61

Closed
rrouse opened this issue May 31, 2010 · 7 comments
Closed

Running rspec hangs #61

rrouse opened this issue May 31, 2010 · 7 comments

Comments

@rrouse
Copy link

rrouse commented May 31, 2010

When I try to run rspec tests, nothing is output except this

activerecord-3.0.0.beta3/lib/active_record/base.rb:1141:in `method_missing'

Then it just hangs with 100% CPU until I kill it.

Nothing is logged, so I don't know what to give you to narrow it down. Hopefully (for your sake) it's unique to me!

@dchelimsky
Copy link
Contributor

What rspec-rails version?

@rrouse
Copy link
Author

rrouse commented May 31, 2010

beta 9.1. Current prerelease version.

@rrouse
Copy link
Author

rrouse commented May 31, 2010

Found it. It was something in one of my models. Not sure why it would hang though. Oh well.

@dchelimsky
Copy link
Contributor

What was it in your model? What did you change to make it stop hanging?

@rrouse
Copy link
Author

rrouse commented May 31, 2010

I had a typo in it. So technically I didn't stop it from hanging.

@jfedgar
Copy link

jfedgar commented May 29, 2013

I had a similar thing happen. I do not know why, exactly. I isolated it to one line of code that was

response.should == form

It was spelled correctly, I could not figure out why that line was causing it to freeze. However, I thankfully had changed what I was testing and so that line became irrelevant anyway. When I deleted the line everything worked.

The only thing I can come up with is the possibility of some hidden character in that line that rspec didn't like. I never did try to delete the line and type it out again by hand.

But, all that to say, if you have this problem, there may be a line somewhere in your rspec code that is causing it. Figure out which test it is freezing on, and start to take things out of that test or step through the code with the debugger until you find the line.

Also, if you kill rspec with ctrl c or ctrl z, make sure the ruby process for it is killed using the command 'ps' and 'kill -9 process_id', otherwise you will end up eating up all of your ram as you run rspec, kill it, run it again etc (that is what happened to me)

@alindeman
Copy link
Contributor

You probably wanted response.body.should == "...".

Using response.should == "..." triggers a bug in Rack. More details at rack/rack#419

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants