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

Use rspec-mocks as default mocking library #404

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

DavidS
Copy link
Contributor

@DavidS DavidS commented Feb 16, 2021

Previously puppetlabs_spec_helper was loading both rspec-mocks and mocha.
This leads to confusing inconsistencies in unit tests. For the longest time
we've been recommending people to default to rspec-mocks. This commit
makes it official for PDK2.0.

If your test suite is not yet ready for this step, remove the default value
through setting mock_with: ~ (YAML's nil value) to get the PDK1.x behavior.

@DavidS DavidS requested review from a team as code owners February 16, 2021 13:45
DavidS added a commit to DavidS/pdk that referenced this pull request Feb 16, 2021
With puppet5's EOL, all supported configurations now have the rsapi gem
in the default gemset.

See puppetlabs/pdk-templates#404 for the second part
of this work.
@cdenneen
Copy link
Contributor

@DavidS please add the mock_with: ~ syntax to docs?

Previously puppetlabs_spec_helper was loading both rspec-mocks and mocha.
This leads to confusing inconsistencies in unit tests. For the longest time
we've been recommending people to default to rspec-mocks. This commit
makes it official for PDK2.0.

If your test suite is not yet ready for this step, remove the default value
through setting `mock_with: ~` (YAML's nil value) to get the PDK1.x behavior.
@DavidS
Copy link
Contributor Author

DavidS commented Feb 16, 2021

@cdenneen good call. Updated the README.

@michaeltlombardi michaeltlombardi merged commit c4898b7 into puppetlabs:main Feb 16, 2021
@DavidS DavidS deleted the make-rspec-default-mock branch February 16, 2021 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants