expectations that code should raise an error should also check against the error message, to make sure that both the right error type is thrown, and it's thrown from the right place:

```ruby
expect { }.to raise_error(Puppet::ResourceError, /umask specification is invalid/
```