acrmp/chefspec — pull request #81 by gildegoma (2012-11-30 13:50:04+00:00)
Title: [#6] Add support for group resource

Pull request to resolve a part of #6, with following additions (strongly inspired/copied from the user implementation #47):
* support of 'group' resource
* some minor code cleanup found by the way

IMO following points are still open:
* implement matchers for missing user/group resource actions: `:modify`, `:manage` (`:lock`, `unlock`)
* provide more examples / scenarios

And I have two 'understanding' questions:
* In [`spec/chefspec/matchers/user_spec.rb`](https://github.com/acrmp/chefspec/blob/master/spec/chefspec/matchers/user_spec.rb#L12): Is following user matcher really correct ? For now I blindly copy-pasted it to the group matcher, but I would expect a true test of existence with corresponding resource (user or group). Do I miss something here ?

```ruby
it "should not match when there are no user" do
matcher.matches?({:resources=>[{:resource_name => 'package',:package_name=>'vim-enhanced'}]}).should be false
end
```

* More generally about [`cucumber-Then steps`](https://github.com/acrmp/chefspec/blob/master/features/step_definitions/user_steps.rb#L13) :
* Why many, many of them (not only for user resource) are (not yet) implemented ? Impossible or too Hard to get it work ?
* I find the text `the (user|group) will not have been created` misleading, because the described scenarios actually expect the opposite, or not? If `then` is thought to stay _not implemented_, I would propose a more generic statement (something like `no expectation implemented`)

Thank you in advance to answer points above during the review... I'll be glad to improve this pull request with your comments!