-
Notifications
You must be signed in to change notification settings - Fork 145
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
(PDK-916) Default to mocha if mock_framework isn't set #239
Conversation
The mocha framework has been the most common option for module testing. A recent commit to address issues with mocha 1.5 added a check for which framework is configured, but not everyone has explicitly configured a framework. Check explicitly for rspec, and fall-back to mocha otherwise.
An alternative to this would be to now require it's set, and error if not. That might be clearer than the type of errors you'll get if it's unset and you assume one or the other. However this should be safe, since the latest release still uses mocha. |
CLA signed by all contributors. |
If a PSH user does not have a `mock_framework` selected before loading `puppetlabs_spec_helper/puppet_spec_helper` warn of the fact that PSH is doing something for them. This does not change the actual behaviour yet, but allows users to select a framework and override the default.
@MikaelSmith amended the check to actually work, and expanded on your idea of only acting if no mock framework has been chosen. See also https://tickets.puppetlabs.com/browse/PDK-916 |
I'm fine with this being taken over. Need anything more from me? |
Thanks for you input, and patience, @MikaelSmith ! |
CLA signed by all contributors. |
The mocha framework has been the most common option for module testing.
A recent commit to address issues with mocha 1.5 added a check for which
framework is configured, but not everyone has explicitly configured a
framework. Check explicitly for rspec, and fall-back to mocha otherwise.