serverspec/specinfra — pull request #174 by RoboticCheese (2014-08-05 23:34:49+00:00)
Title: Add pkgutil support for OS X package install checks

I've got a .dmg file package being installed with the OS X's system packager and want to be able to test its status with `pkgutil`. This adds support for that.

For example, command line:

```
$ pkgutil --pkg-info com.getchef.pkg.chefdk
package-id: com.getchef.pkg.chefdk
version: 0.2.0
volume: /
location: opt/chefdk
install-time: 1406598641
```

is now testable from ServerSpec with:

```
expect(package('com.getchef.pkg.chefdk')).to be_installed.by(:pkgutil).with_version('0.2.0')
```