Skip to content

Commit

Permalink
Merge pull request #473 from skoef/facterImplementation
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak authored Jan 19, 2023
2 parents 9a16c87 + 174f509 commit 434e063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Travis uses a .travis.yml file in the root of your repository to learn about you
| Key | Description |
| :------------- |:--------------|
|default_facter_version|Sets the [`default_facter_version`](https://github.com/mcanevet/rspec-puppet-facts#specifying-a-default-facter-version) rspec-puppet-facts parameter.|
|facter_implementation|Sets the [`facter_implementation`](https://github.com/puppetlabs/rspec-puppet#facter_implementation) rspec-puppet parameter. Current available options are `rspec` and `facter`, with `facter` being the default. The `rspec` implementation offers a significant performance improvement and results in faster unit tests.|
|hiera_config|Sets the [`hiera_config`](http://rspec-puppet.com/documentation/configuration/#hiera_config) rspec-puppet parameter.|
|hiera_config_ruby|Sets the [`hiera_config`](http://rspec-puppet.com/documentation/configuration/#hiera_config) rspec-puppet parameter. A ruby expression returning the path to your hiera.yaml file. `hiera_config` takes precedence if both values `hiera_config` and `hiera_config_ruby` are specified. |
|mock_with|Defaults to `':rspec'`. If you need the previous default of "some mocha and some rspec-mocks", set `mock_with: ~` (tilde symbol, the YAML null value).|
Expand Down
3 changes: 3 additions & 0 deletions moduleroot/spec/spec_helper.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ RSpec.configure do |c|
<%- if @configs['default_facter_version'] -%>
c.default_facter_version = '<%= @configs['default_facter_version'] %>'
<%- end -%>
<%- if @configs['facter_implementation'] -%>
c.facter_implementation = <%= @configs['facter_implementation'] %>
<%- end -%>
<%- if @configs['hiera_config'] -%>
c.hiera_config = '<%= @configs['hiera_config'] %>'
<%- elsif @configs['hiera_config_ruby'] -%>
Expand Down

0 comments on commit 434e063

Please sign in to comment.