Skip to content

Commit

Permalink
Added README for custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Ratcliffe committed Mar 6, 2018
1 parent baa6be4 commit 3b9f535
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Onceover is a tool to automatically run basic tests on an entire Puppet controlr
- [Using Workarounds](#using-workarounds)
- [Extra tooling](#extra-tooling)
- [Plugins](#plugins)
- [Overriding Onceover's Templates](#overriding-onceovers-templates)
- [Accessing Onceover in a traditional RSpec test](#accessing-onceover-in-a-traditional-rspec-test)
- [Accessing fact sets in a traditional RSpec test](#accessing-fact-sets-in-a-traditional-rspec-test)
- [Accessing Roles in a traditional RSpec test](#accessing-roles-in-a-traditional-rspec-test)
Expand Down Expand Up @@ -122,7 +123,7 @@ before:

after:
- "puts 'Test finished running'"
```
```
**opts** The `opts` section overrides defaults for the `Onceover::Controlrepo` class' `opts` hash.

Expand Down Expand Up @@ -488,6 +489,10 @@ This takes your Puppetfile and actually modifies all of the module versions in t
4. Run Onceover agan
5. Create a pull request if all tests pass

### Overriding Onceover's Templates

Onceover uses templates to create a bunch of files in the `.onceover` directory, these templates can be modified if required. To do this create your own custom template with the same name os the original in the `spec/templates/` directory and it will be used in preference to the default template. e.g. `spec/templates/spec_helper.rb.erb`

### Accessing Onceover in a traditional RSpec test

If you would like to use `onceover.yaml` to manage which tests you want to run, but want more than just `it { should_compile }` tests to be run you can write you own as follows:
Expand Down

0 comments on commit 3b9f535

Please sign in to comment.