serverspec/specinfra — pull request #238 by rreas (2014-10-03 22:41:12+00:00)
Title: Use corrected stat method for FreeBSD

This PR addresses the following when running specs on an actual FreeBSD machine:

```
1) File "/data" should be owned by "my_account"
On host `xxx.xxx.xxx'
Failure/Error: it { should be_owned_by 'my_account' }
expected `File "/data".owned_by?("my_account")` to return true, got false
/bin/sh -c stat\ -c\ \%U\ /data\ \|\ grep\ --\ \\\^my_account\\\$

# ./spec/xxx.xxx.xxx/files_spec.rb:15:in `block (3 levels) in '

2) File "/data" should be grouped into "my_account"
On host `xxx.xxx.xxx'
Failure/Error: it { should be_grouped_into 'my_account' }
expected `File "/data".grouped_into?("my_account")` to return true, got false
/bin/sh -c stat\ -c\ \%G\ /data\ \|\ grep\ --\ \\\^my_account\\\$

# ./spec/xxx.xxx.xxx/files_spec.rb:16:in `block (3 levels) in '
```

Somewhat strangely, the following new specs pass:
`bundle exe rspec spec/command/freebsd/file_spec.rb`

But, when run as part of the full suite the same specs fail:
`bundle exec rake spec:command`

I'm not sure why this is, and I thought I'd send the PR as a request for help. My initial investigation indicates the property[:os] is not updated by the `set :os, :family => 'freebsd'` line at the top of the file, but I'm not sure why.

Thanks!