Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md: Document how to use voxpupuli-test #147

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading