Re: [Cucumber] req: World#flush for asking formatters to flush `puts` output

24 views
Skip to first unread message

aslak hellesoy

unread,
May 2, 2013, 1:35:47 PM5/2/13
to cu...@googlegroups.com


On Thursday, May 2, 2013, Randy Harmon wrote:

Understanding that some formatters might choose to ignore the request, it would sure be nice to be able to ask ones that do support it to flush the buffered `puts` output.

I'm detecting scenario failure in an After hook and probing PhantomJS for its Network connections report, so that I can spew any non-200 response details along with the failure.  Since I'm using Spork at development time, the STDOUT (or STDERR).puts goes to the spork console instead of the cuke console.  And anything I puts() appears in the *next* scenario's first step.  :(

Any suggestions?

I don't think I like the leaky World#flush abstraction you're suggesting. wouldn't it be hetter if formatters autoflushed?

Aslak 
R

--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Randy Harmon

unread,
May 2, 2013, 5:23:05 PM5/2/13
to cu...@googlegroups.com
I think they do auto-flush, but they're doing it before the After hooks.  Maybe they could do it again after any afters?

R

On Thursday, May 2, 2013 10:35:47 AM UTC-7, Aslak Hellesøy wrote:


On Thursday, May 2, 2013, Randy Harmon wrote:

Understanding that some formatters might choose to ignore the request, it would sure be nice to be able to ask ones that do support it to flush the buffered `puts` output.

I'm detecting scenario failure in an After hook and probing PhantomJS for its Network connections report, so that I can spew any non-200 response details along with the failure.  Since I'm using Spork at development time, the STDOUT (or STDERR).puts goes to the spork console instead of the cuke console.  And anything I puts() appears in the *next* scenario's first step.  :(

Any suggestions?

I don't think I like the leaky World#flush abstraction you're suggesting. wouldn't it be hetter if formatters autoflushed?

Aslak 
R

--
-- Rules --
 
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en

---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+unsubscribe@googlegroups.com.

aslak hellesoy

unread,
May 2, 2013, 5:24:43 PM5/2/13
to Cucumber Users
Please don't top-post (rule 2)


On Thu, May 2, 2013 at 4:23 PM, Randy Harmon <rha...@rocketfuelinc.com> wrote:
I think they do auto-flush, but they're doing it before the After hooks.  Maybe they could do it again after any afters?


Yes maybe. Feel free to send a pull request.
 
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en

---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages