Skip to content

Commit

Permalink
fixed documentation for shared examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Sep 18, 2013
1 parent 23af22e commit bf09590
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,18 +548,28 @@ end
See comments in source code: *spec/unit/puppet/shared_behaviours/ptomulik/vash/validator.rb*.
#### *Vash* shared examples
#### *Vash::Contained* and *Vash::Inherited* shared examples
Combined *Vash:Hash* and *Vash::Validator* into one shared example.
Any of *Vash::Contained* or *VAsh::Inherited* combines *Vash:Hash* and
*Vash::Validator* into one suite of shared exampled.
*Synopsis*
```ruby
it_behaves_like 'Vash', params
it_behaves_like 'Vash::Inherited', params
```
or
```ruby
it_behaves_like 'Vash::Inherited', params
```
where `params` is a Hash of mixed parameters to `Vash::Hash` and
`Vash::Validator`. Note, that you don't have to define *sample_items*, because
they are internally generated from *valid_items* and *invalid_items*.
they are internally generated from *valid_items* and *invalid_items*. The
*hash_initializers*, if provided, must consists only of valid items or your
tests will fail.
## Development
Expand Down

0 comments on commit bf09590

Please sign in to comment.