You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been testing module updates in TravisCI, and it kept giving me a deprecation message about defaulting to using "mocha" for the "mock" functions.
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
Now, I see in the documetation for this change someone has provided a nice helper on adding a few lines to .sync.yml
The second method, putting this config at the very top of the file, removes the deprecation warning message from TravisCI. So it obviously needs to happen very early in the setup, before other things are called.
It seems like the simplest fix for this change would be to make "mock_with :rspec" the default template, and leave the remaining settings to be added at the bottom via .sync.yml as documented.
The text was updated successfully, but these errors were encountered:
I have been testing module updates in TravisCI, and it kept giving me a deprecation message about defaulting to using "mocha" for the "mock" functions.
Now, I see in the documetation for this change someone has provided a nice helper on adding a few lines to
.sync.yml
https://github.com/puppetlabs/puppetlabs_spec_helper#mock_with
https://github.com/puppetlabs/pdk-templates#specspec_helperrb
Which works when running
pdk update
to update thespec/spec_helper.rb
file, BUT it still doesn't fix the deprecation message in my TravisCI runs.For some reason, the way
pdk update
handles this line, it adds it to the bottom of the file like so:The documentation hints at putting it at the top of the file, like so:
The second method, putting this config at the very top of the file, removes the deprecation warning message from TravisCI. So it obviously needs to happen very early in the setup, before other things are called.
It seems like the simplest fix for this change would be to make "mock_with :rspec" the default template, and leave the remaining settings to be added at the bottom via
.sync.yml
as documented.The text was updated successfully, but these errors were encountered: