rodjek/rspec-puppet — pull request #151 by rodjek (2014-01-25 07:13:41+00:00)
Title: Capture compile failures

Changes the implicit subject of the class, host and defined type specs to be a lambda so that we can catch the exceptions generated by compilation failures inside our specs (this is a breaking change, so we'll need to bump major versions after merging this).

Now, instead of the previously recommended:

```ruby
expect { should compile }.to raise_error(Puppet::Error, /whatever/)
```

We can use:

```ruby
it { should compile.and_raise_error(/whatever/) }
```