calavera/minitest-chef-handler — pull request #42 by juanje (2012-12-23 06:04:12+00:00)
Title: Add report to the exception so other handlers can use it

This add a bit more of information to the exception with may be useful for others handlers.

If you're using others handlers (e.g. [chef-handler-mail](https://rubygems.org/gems/chef-handler-mail), [chef-handler-s3](https://rubygems.org/gems/chef-handler-s3)...) to send or store the reports elsewhere, right now you don't get any information about which test has fail.
Adding this line the you can use the `run_status.exception` or the `run_status.formatted_exception` to see wich test did fail.

For example, instead of have this `run_status.formatted_exception`:

```
RuntimeError: MiniTest failed with 1 failure(s) and 0 error(s).
```

You could have something like this:

```
MiniTest failed with 2 failure(s) and 0 error(s).
Failure:
test_0002_must_own_to_the_root(recipe::spec_examples::default::config file::only the root can modify the config file) [/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/minitest-chef-handler-0.6.4/lib/minitest-chef-handler/resources.rb:41]:
The file does not have the expected owner.
Expected: "oot"
Actual: "root"
```

Much more useful.
I hope you like it and thanks for this great handler :smile: