cucumber/cucumber — pull request #434 by sldblog (2013-04-11 22:32:57+00:00)
Title: Avoid confusing error message with duplicated formats.

If one specified the same formatter and output (eg. `--format html --out cucumber/report.html`) in both the `std_opts` part of `cucumber.yml` and the command line, the error message was the following:

> "All but one formatter must use --out, only one can print to each stream (or STDOUT)".

This was really bewildering in most cases, since the user usually wants to use the command line to try/verify/rerun things and the message is not helping him/her understand the cause of the problem (remove the formatter from the config or the CLI, duh!).

To avoid the confusing error message, the (format, output) pairs are now uniqued, which I think is consistent with the user's wishes.

----

### How to reproduce the problem

Modify `cucumber.yml` to contain:
```ruby
std_opts = "--format html --out report.html --format progress features --tags ~@wip"
```

And execute:
```
$ bundle exec cucumber --format html --out report.html
All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)
/home/sldblog/Documents/work/cucumber/lib/cucumber/cli/configuration.rb:209:in `arrange_formats'
```

At this point the user is usually sufficiently flabbergasted.

### What the commit does

With the same `cucumber.yml`, the command won't fail but work as intended:

```
$ bundle exec cucumber --format html --out report.html
Using the default profile...
..............................^C
Exiting... Interrupt again to exit immediately.
.

3 scenarios (1 skipped, 2 passed)
20 steps (20 passed)
0m3.602s
```