[rspec-users] [Cucumber] Fail a scenario from After or AfterStep
ben at benmabey.com
Tue May 19 22:39:25 EDT 2009
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.
Have you seen what Matt added recently?
I think this should cover your use case... WDYT?
> 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 ask: Can you show me
>>> an example of a StepDefinition that would cause the file to be
>> That is a tougher question, because any browser interaction that
>> causes an HTTP request to the app under test could result in a server
>> our app, they are triggered by clicking on links, submitting forms,
>> dragging and dropping divs, hovering over a div, waiting for a page
>> load to complete, as a callback from interacting with a 3rd party web
>> service, or waiting for a setTimeout to execute.
>> So one way I could tackle it is to add a step to the end of every
>> scenario that says "Then the application should not have issued any
>> responses with 50x status codes", but that would be a) repetitive,
>> and b) not fail until all steps had run, making it harder to track
>> down the step in the test where the failure occurred.
>> One way to look at may be that I'm trying to enforce an invariant.
>> Under no circumstances in my test suite is it appropriate for my app
>> to raise a 50x error. In my Rails integration suite, webrat enforces
>> this particular invariant for me, but can't find a good hook in the
>> selenium test stack to do this, which is why I'm looking at this route.
>> Luke Melia
>> luke at lukemelia.com
>> rspec-users mailing list
>> rspec-users at rubyforge.org
> Luke Melia
> luke at lukemelia.com
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users