[rspec-devel] Multiple formatters
mailing_lists at railsnewbie.com
Tue May 1 07:24:50 EDT 2007
On Apr 24, 2007, at 4:41 AM, aslak hellesoy wrote:
> Hi all,
> RSpec supports multiple formatters, but currently you can only use one
> at a time. I really need to use several at the same time.
> I'd like to make RSpec handle several --format options. However, that
> would require some rethinking of how/where output is written - it
> can't all go to the same stream (file or stdout).
> So I'm thinking of making --format take a composite argument:
> --format html:/path/to/index.html --format rdoc:/path/to/index.rdoc
> --format progress
> If nothing comes after the format, output is STDOUT, so this would be
> backwards compatible.
> If we do this, we could also get rid of --failures - it would just be
> a special formatter.
> rspec-devel mailing list
> rspec-devel at rubyforge.org
I've seen that you've already implemented this in trunk.
I'm not running the latest version of trunk, but I've noticed that in
0.9RC1, when specifying a failures file and an examples file, that
the following behavior is exhibited by rspec:
1. If the file exists, but is empty, rspec will run all specs
2. If the file exists, but contains failing examples, these failing
specs will be run
3. If the file does not exists, it creates the file (through --
failures - now --format e:filename), but runs no specs.
Would a patch addressing the third case (which would mimic the first
case) be a welcome addition to rspec?
More information about the rspec-devel