Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber - How configure it to use "--format pretty" as default?

I'm starting learning rails, and having some troubles on configure cucumber to run my bdd tests. What I want is run

cucumber features

and this translate to

cucumber features --format pretty

I tried to do this editing the config/cucumber.yml file (on a rails project). Edited the line:

default: <%= std_opts %> features

resulting on:

default: <%= std_opts %> --format pretty features

But it make some erros happen:

Using the default profile... All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)

What I can do to make this option "--format pretty" default? Also, is there any other good option to put as default to make result more clear?

Thank you.

like image 357
Gabriel L. Oliveira Avatar asked May 12 '10 04:05

Gabriel L. Oliveira


1 Answers

I found that this message:

Using the default profile... All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)

is related to a cucumber bug, like posted on this site

My workaround was edit config/cucumber.yml and left it like this:

std_opts = "--format rerun --out rerun.txt --strict --tags ~@wip"

%>

.....

default: <%= std_opts %> -f pretty features

Now it worked. I think this is cloudy for me, and maybe some more comments on this (and maybe another) 'bug' would be nice. Also, another useful settings would be nice.

like image 167
Gabriel L. Oliveira Avatar answered Oct 20 '22 11:10

Gabriel L. Oliveira