calavera/minitest-chef-handler — pull request #7 by acrmp (2012-04-12 15:03:08+00:00)
Title: Matchers

Hi David,

This adds custom assertions (see #2) and MiniTest::Spec support. These changes have been done as part of work I'm doing for Opscode on cookbook testing.

I've added another [example cookbook](https://github.com/kotiri/minitest-chef-handler/blob/f529c787bd0a45ef82c9844f3596abd003591293/examples/cookbooks/spec_examples/files/default/tests/minitest/example_test.rb) which shows use from MiniTest::Spec.

Few things you may want to consider:

* There's a monkey-patch in a65184eb02fe1b0ec84cc78c64b73e72023dcef5 to `Chef::Client` in order to fail the build safely. I couldn't find a nicer way of doing this.
* The assertion names as used from `MiniTest::Unit` may still strike you as too verbose. I'm writing my specs with `MiniTest::Spec` so happy if you want to rename any of these as long as the infection is updated.
* I've been using this updated version via minitest-handler-cookbook with success, but it may need some tweaking to run as an example from Vagrant.

Cheers,

Andrew.