puppetlabs/puppet — pull request #912 by daniel-pittman (2012-07-10 19:32:39+00:00)
Title: tests must use must not should on resources

When testing a `Puppet::Resource` instance, you need to call `must` rather than `should` to establish an expectation - because there is a pre-existing `should` method, and rspec just invokes that instead.

This meant that a bunch of tests were simply never actually *doing* anything useful, and so we had some bugs sneak in when we were not looking.

In addition to fixing the specific bugs I have also extended the test harness monkey patch to validate the arguments to the method and fail when it is improperly used, ensuring that this doesn't happen again.