Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-21 Thread aslak hellesoy
> > On 20 May 2009, at 09:33, aslak hellesoy wrote: > >>> >>> On 20 May 2009, at 00:04, aslak hellesoy wrote: >>> > Any further thoughts on this, Aslak? I'd prefer to go with a solution > in > line with the future direction of Cucumber if possible. > Sorry, forgot to get b

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-20 Thread Matt Wynne
On 20 May 2009, at 09:33, aslak hellesoy wrote: On 20 May 2009, at 00:04, aslak hellesoy wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Sorry, forgot to get back to you Luke. I'm convinced. We'll a

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-20 Thread aslak hellesoy
> > On 20 May 2009, at 00:04, aslak hellesoy wrote: > >>> Any further thoughts on this, Aslak? I'd prefer to go with a solution in >>> line with the future direction of Cucumber if possible. >>> >> >> Sorry, forgot to get back to you Luke. >> >> I'm convinced. We'll add an AfterStep hook. Do you wa

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-20 Thread aslak hellesoy
> On May 19, 2009, at 10:43 PM, Luke Melia wrote: > >> On May 19, 2009, at 7:04 PM, aslak hellesoy wrote: >> >>> I'm convinced. We'll add an AfterStep hook. Do you want to give a stab >>> at a patch? Start by writing a feature - see >>> features/after_block_exceptions.feature for a good example of

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Luke Melia
On May 19, 2009, at 10:43 PM, Luke Melia wrote: On May 19, 2009, at 7:04 PM, aslak hellesoy wrote: I'm convinced. We'll add an AfterStep hook. Do you want to give a stab at a patch? Start by writing a feature - see features/after_block_exceptions.feature for a good example of the style we li

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Ben Mabey
Ben Mabey wrote: Luke Melia wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Cheers, Luke Have you seen what Matt added recently? https://rspec.lighthouseapp.com/projects/16211/tickets/330-gracefully-hand

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Ben Mabey
Luke Melia wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Cheers, Luke Have you seen what Matt added recently? https://rspec.lighthouseapp.com/projects/16211/tickets/330-gracefully-handle-exceptions-in-a

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Luke Melia
On May 19, 2009, at 7:04 PM, aslak hellesoy wrote: I'm convinced. We'll add an AfterStep hook. Do you want to give a stab at a patch? Start by writing a feature - see features/after_block_exceptions.feature for a good example of the style we like... Sounds good. I'll give it a whirl tonight.

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Matt Wynne
On 20 May 2009, at 00:04, aslak hellesoy wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Sorry, forgot to get back to you Luke. I'm convinced. We'll add an AfterStep hook. Do you want to give a stab at

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread aslak hellesoy
> Any further thoughts on this, Aslak? I'd prefer to go with a solution in > line with the future direction of Cucumber if possible. > Sorry, forgot to get back to you Luke. I'm convinced. We'll add an AfterStep hook. Do you want to give a stab at a patch? Start by writing a feature - see feature

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Luke Melia
Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Cheers, Luke On May 15, 2009, at 5:12 PM, Luke Melia wrote: On May 15, 2009, at 3:36 PM, aslak hellesoy wrote: Thanks for doing that. I have one more favour to a

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread Luke Melia
On May 15, 2009, at 3:36 PM, aslak hellesoy wrote: Thanks for doing that. I have one more favour to ask: Can you show me an example of a StepDefinition that would cause the file to be created? That is a tougher question, because any browser interaction that causes an HTTP request to the app

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread aslak hellesoy
> On May 15, 2009, at 10:16 AM, aslak hellesoy wrote: > >> Can you show me the code you would want to put in AfterStep that would >> detect a 500 error? > > I've written a simple piece of rack middleware (included below) that will > create a file in the event a 500 is raised. I would clear the file

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread Luke Melia
On May 15, 2009, at 10:16 AM, aslak hellesoy wrote: Can you show me the code you would want to put in AfterStep that would detect a 500 error? I've written a simple piece of rack middleware (included below) that will create a file in the event a 500 is raised. I would clear the file before

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread aslak hellesoy
> On May 15, 2009, at 4:25 AM, aslak hellesoy wrote: > >> To be honest, I don't remember what happened to AfterStep. I think we >> had it at some point, but can't see it in the codebase. Did I remove >> it? Or was that back in the pre-Cucumber days? Help me remember >> here... > > I'm not sure. I s

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread Luke Melia
On May 15, 2009, at 4:25 AM, aslak hellesoy wrote: To be honest, I don't remember what happened to AfterStep. I think we had it at some point, but can't see it in the codebase. Did I remove it? Or was that back in the pre-Cucumber days? Help me remember here... I'm not sure. I saw a reference

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread Ben Lovell
On Fri, May 15, 2009 at 9:25 AM, aslak hellesoy wrote: > > I'm not so sure I like the idea of AfterStep - smells like a > workaround for something that belongs elsewhere. Can't your have > selenium-rc (or a helper method you create around it) raise those > exceptions? > > Given /bla/ do > # don't

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread aslak hellesoy
> I'm trying to make sure that my cucumber selenium suite fails if my Rails > app returns any 500 response codes. I'm working on what the best way to > identify this state, but the question I'd like to put to the list is this: > If I want to check for this error condition in an After or AfterStep,

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-15 Thread Matt Wynne
On 15 May 2009, at 07:01, Luke Melia wrote: I'm trying to make sure that my cucumber selenium suite fails if my Rails app returns any 500 response codes. I'm working on what the best way to identify this state, but the question I'd like to put to the list is this: If I want to check for th

[rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-14 Thread Luke Melia
I'm trying to make sure that my cucumber selenium suite fails if my Rails app returns any 500 response codes. I'm working on what the best way to identify this state, but the question I'd like to put to the list is this: If I want to check for this error condition in an After or AfterStep,