Forum: RSpec A silent cucumber?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
James B. (Guest)
on 2009-02-26 20:57
I believe that what I am trying to do should be possible, but I cannot
seem to find the right combination of switches to get cucumber to run
silently and only print the failing and pending steps.  I do not have a
cucumber.yml file

I have tried the following (from the project root):

$ cucumber -q
...
0 scenarios

If I run rake features then I have 29 scenarios.

$ cucumber -q features
...
29 scenarios
29 steps failed
125 steps skipped
22 steps pending (22 with no step definition)

If I run rake features then 172 steps pass 3 are skipped and 1 is
pending

$ cucumber -q -r features features
...
Pending Notes:
And /entity named "(.*)" (is|is not) an? "(.*)"/ (TODO) #
features/app/models/entities/step_definitions/entity_steps.rb:20

29 scenarios
172 steps passed
3 steps skipped
1 step pending

Close, but I still see all of the feature scenarios and steps, just not
the files that they come from.

Is there a way to only display the step detail for feature scenarios
that contain failing or pending steps?
Matt W. (Guest)
on 2009-02-27 19:02
(Received via mailing list)
On 26 Feb 2009, at 18:57, James B. wrote:
> Is there a way to only display the step detail for feature scenarios
> that contain failing or pending steps?

I think you'll have to write your own formatter.

It's pretty easy - take a look at the examples in lib/cucumber/
formatter for some pointers.

Matt W.
http://blog.mattwynne.net
http://www.songkick.com
James B. (Guest)
on 2009-02-27 19:03
Matt W. wrote:
> On 26 Feb 2009, at 18:57, James B. wrote:
>> Is there a way to only display the step detail for feature scenarios
>> that contain failing or pending steps?
>
> I think you'll have to write your own formatter.
>
> It's pretty easy - take a look at the examples in lib/cucumber/
> formatter for some pointers.

Thanks.
James B. (Guest)
on 2009-02-27 20:39
Matt W. wrote:

>
> I think you'll have to write your own formatter.
>

Actually, after looking at the code I discover that the existing
progress formatter does just about what I was looking for.

Thanks for the pointer.
This topic is locked and can not be replied to.