Puppet

From wiki.tamerz.com
Revision as of 01:34, 27 November 2019 by Tmctigue (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

When creating a new module with PDK, running unit tests gives the following message:

Deprecation Warnings:

puppetlabs_spec_helper: defaults `mock_with` to `:mocha`. See https://github.com/puppetlabs/puppetlabs_spec_helper#mock_with to choose a sensible value for you

To switch to ":mocha" as mentioned, create a ".sync.yml" file in the module directory and add the following lines:

---
spec/spec_helper.rb:
  mock_with: ':rspec'

Then, run "pdk update" to apply the changes.