Josh Knowles
2007-Nov-13 20:23 UTC
[rspec-users] 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 Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com
David Chelimsky
2007-Nov-13 20:43 UTC
[rspec-users] rails story runner returning a nil response code
On Nov 13, 2007 2:23 PM, Josh Knowles <joshknowles at gmail.com> 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, > http://pastie.caboo.se/117497 > > 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.> > > > > -- > Josh Knowles > phone: 509-979-1593 > email: joshknowles at gmail.com > web: http://joshknowles.com > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Josh Knowles
2007-Nov-13 21:33 UTC
[rspec-users] rails story runner returning a nil response code
On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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 Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com
David Chelimsky
2007-Nov-13 21:57 UTC
[rspec-users] rails story runner returning a nil response code
On Nov 13, 2007 3:33 PM, Josh Knowles <joshknowles at gmail.com> wrote:> On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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?> > -- > > Josh Knowles > phone: 509-979-1593 > email: joshknowles at gmail.com > web: http://joshknowles.com > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Josh Knowles
2007-Nov-13 22:02 UTC
[rspec-users] rails story runner returning a nil response code
On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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.
David Chelimsky
2007-Nov-13 22:17 UTC
[rspec-users] rails story runner returning a nil response code
On Nov 13, 2007 4:02 PM, Josh Knowles <joshknowles at gmail.com> wrote:> On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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> > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Chris Parsons
2007-Nov-13 22:30 UTC
[rspec-users] rails story runner returning a nil response code
On 13 Nov 2007, at 22:17, David Chelimsky wrote:> On Nov 13, 2007 4:02 PM, Josh Knowles <joshknowles at gmail.com> wrote: >> On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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.+1 for this one - would be great to be able to see the exceptions when running the story. Thanks! Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071113/557e2cd2/attachment.html
Josh Knowles
2007-Nov-16 17:03 UTC
[rspec-users] rails story runner returning a nil response code
On 11/13/07, David Chelimsky <dchelimsky at gmail.com> 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 Knowles phone: 509-979-1593 email: joshknowles at gmail.com web: http://joshknowles.com