Rails story runner returning a nil response code

Has anyone noticed any problems with the Rails story runner returning
a response code of “0” when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
http://pastie.caboo.se/117497

Regular controller specs pass as expected.


Josh K.
phone: 509-979-1593
email: [email protected]
web: http://joshknowles.com

On Nov 13, 2007 2:23 PM, Josh K. [email protected] wrote:

Has anyone noticed any problems with the Rails story runner returning
a response code of “0” when doing get/post/etc methods? I just
grabbed the latest rails/rspec and just started noticing this problem,
Parked at Loopia

Regular controller specs pass as expected.

RailsStory just wraps ActionController::IntegrationTest, so you’re
getting what you would get from an IntegrationTest.

Controller examples override rescue_action for you, but RailsStory
does not yet. I suppose we should add that.

On 11/13/07, David C. [email protected] wrote:

RailsStory just wraps ActionController::IntegrationTest, so you’re
getting what you would get from an IntegrationTest.

You are correct. I was getting a stack-level-too-deep caused by a
problem with how IntegrationTest was overwriting url_for which wasn’t
getting properly propagated up.

Sorry for the noise.


Josh K.
phone: 509-979-1593
email: [email protected]
web: http://joshknowles.com

On Nov 13, 2007 3:33 PM, Josh K. [email protected] wrote:

On 11/13/07, David C. [email protected] wrote:

RailsStory just wraps ActionController::IntegrationTest, so you’re
getting what you would get from an IntegrationTest.

You are correct. I was getting a stack-level-too-deep caused by a
problem with how IntegrationTest was overwriting url_for which wasn’t
getting properly propagated up.

Sorry for the noise.

No worries - what do you think about treating controllers the same way
in stories that we do in controller examples?

On Nov 13, 2007 4:02 PM, Josh K. [email protected] wrote:

On 11/13/07, David C. [email protected] wrote:

No worries - what do you think about treating controllers the same way
in stories that we do in controller examples?

I think that makes sense. Currently you have to view the test.log
file to see the exceptions, I’d like to see these re-raised.

I can patch tonight if you’re in agreement.

That would be awesome. Take a look at how it’s done in the spec/dsl
dir. There’s a file that monkey patches AR::Base so the default
behaviour is that you’ll see the failures, but if you decide to
override rescue_action on your own, you get that instead.

Cool?

Thanks man.

Cheers,
David

On 13 Nov 2007, at 22:17, David C. wrote:

That would be awesome. Take a look at how it’s done in the spec/dsl
dir. There’s a file that monkey patches AR::Base so the default
behaviour is that you’ll see the failures, but if you decide to
override rescue_action on your own, you get that instead.

+1 for this one - would be great to be able to see the exceptions when
running the story. Thanks!

Chris

On 11/13/07, David C. [email protected] wrote:

No worries - what do you think about treating controllers the same way
in stories that we do in controller examples?

I think that makes sense. Currently you have to view the test.log
file to see the exceptions, I’d like to see these re-raised.

I can patch tonight if you’re in agreement.

On 11/13/07, David C. [email protected] wrote:

That would be awesome. Take a look at how it’s done in the spec/dsl
dir. There’s a file that monkey patches AR::Base so the default
behaviour is that you’ll see the failures, but if you decide to
override rescue_action on your own, you get that instead.

So I’ve taken a first stab at this, but keep running into stack-level
too deep problems. Not sure if its the project I’m testing this on or
something to do with the way that integration tests are run. Either
way I’m going to bring up a fresh environment over the weekend and
give it another shot.


Josh K.
phone: 509-979-1593
email: [email protected]
web: http://joshknowles.com