acrmp/chefspec — pull request #144 by acrmp (2013-05-30 21:28:22+00:00)
Title: Shell guard stubbing

This pull request adds support for stubbing the result of shell guards, extending the basic guard support added in #142.

The syntax for stubbing shell guards looks like:

```ruby
# Any only_if or not_if shell conditional that contains 'grep' will return true
chef_run.stub_command(/grep/, true)
```

Shell guards will not shell out by default even if `:evaluate_guards` is set to `true` - instead examples will fail with a warning that the guard needs stubbing.

You can override this behaviour so that it will actually run shell commands locally by specifying `:actually_run_shell_commands` to the constructor.

Cheers,

Andrew.