Skip to content

Commit

Permalink
Merge pull request #147 from bastelfreak/docs
Browse files Browse the repository at this point in the history
README.md: Document how to use voxpupuli-test
  • Loading branch information
bastelfreak authored Sep 6, 2024
2 parents e016cca + 91da13e commit f5e436f
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
[![RubyGem Version](https://img.shields.io/gem/v/voxpupuli-test.svg)](https://rubygems.org/gems/voxpupuli-test)
[![RubyGem Downloads](https://img.shields.io/gem/dt/voxpupuli-test.svg)](https://rubygems.org/gems/voxpupuli-test)

This is a helper Gem to test the various Vox Pupuli Puppet modules. This Gem provides common functionality for rspec-puppet based testing. The aim is to reduce the boiler plate and need for modulesync.
This is a helper Gem to test the various Vox Pupuli Puppet modules.
This Gem provides common functionality for rspec-puppet based testing and static code analysis.
The aim is to reduce the boiler plate and need for modulesync.

## Usage

Expand Down Expand Up @@ -36,6 +38,43 @@ inherit_gem:
voxpupuli-test: rubocop.yml
```
To run the linter, the syntax checker and the unit tests:
```sh
bundle exec rake test
```

To run your all the unit tests:

```sh
bundle exec rake spec
```

To run a specific spec test set the `SPEC` variable:

```sh
SPEC=spec/classes/foo_spec.rb bundle exec rake spec
```

To run all the static code analysis and linting:

```sh
bundle exec rake validate lint check rubocop
```


To autocorrect Puppet files:

```sh
bundle exec rake lint_fix
```

To autocorrect Ruby files:

```sh
bundle exec rake rubocop:autocorrect
```

## Rake tasks

### `check:trailing_whitespace`
Expand Down

0 comments on commit f5e436f

Please sign in to comment.