Weird error message

Hi, as I add more and more tests I sometimes get this error:

Expected response to be a <:success>, but was <0>

I’m a little lost as to what it means… no response? error? But it
seems to come and go as I change code. I never quite figured out why
though.

Thanks for any help :slight_smile:
Jonzo.

Hi I’m still having trouble with this, has anyone ever seen this
message before?

fyi, I’m still using rails 1.2.3 till I can get time to make the move
to 2.0. It might not be in the latest version, but I’d still like to
know if anyone has seen this message before… ever

Thanks again,
Jonzo.

On Mar 25, 2008, at 5:23 PM, Jonzo wrote:

Jonzo.
When you get a 0 instead of an HTTP response code, the page probably
didn’t render correctly. Look at your test.log or, in your test:

puts response.body

That may give you a better idea what’s going on.

Thanks! I’ll look into that.

Do you know anything more about this? I ask because usually when I
have an error in a template or action it is output as an exception in
the test summary. Does this error show up when there is a specific
type of error? for instance, if rails locks up? or if it fails in a
before_filter? or something?

On Wed, Mar 26, 2008 at 2:50 PM, s.ross [email protected] wrote:

though.


Jonathan

On Mar 25, 2008, at 6:54 PM, Jonathan F. wrote:

Do you know anything more about this? I ask because usually when I
have an error in a template or action it is output as an exception in
the test summary. Does this error show up when there is a specific
type of error? for instance, if rails locks up? or if it fails in a
before_filter? or something?

I’ve never characterized the problems that cause this beyond the fact
that it happens when testing controllers. The key thing is you didn’t
get an HTTP response code. So you know you didn’t get through render,
which makes it likely that your code is flawed. That’s really the
first thing you wanted to know from your test anyway, right?

Ok cool, I’ll update this thread when I figure it out :slight_smile:

On Wed, Mar 26, 2008 at 3:01 PM, s.ross [email protected] wrote:

get an HTTP response code. So you know you didn’t get through render,
which makes it likely that your code is flawed. That’s really the
first thing you wanted to know from your test anyway, right?


Jonathan

Found the problem! I had monkey patched CGI::Session to allow flash to
provide a session id, but I’d moved the file around in my lib
directory so it wasn’t loading properly, and rails was dying before it
even got to my application!

all fixed now,
Thanks for your help s.ross :slight_smile:

On Wed, Mar 26, 2008 at 3:04 PM, Jonathan F. [email protected]
wrote:

type of error? for instance, if rails locks up? or if it fails in a


Jonathan


Jonathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs