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

(PDK-916) Default to mocha if mock_framework isn't set #239

Merged
merged 3 commits into from
Apr 11, 2018

Conversation

MikaelSmith
Copy link
Contributor

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.

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.
@MikaelSmith
Copy link
Contributor Author

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.

@puppetcla
Copy link

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.
@DavidS
Copy link
Contributor

DavidS commented Apr 10, 2018

@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

@DavidS DavidS changed the title Default to mocha if mock_framework isn't set (PDK-916) Default to mocha if mock_framework isn't set Apr 10, 2018
@MikaelSmith
Copy link
Contributor Author

I'm fine with this being taken over. Need anything more from me?

@DavidS
Copy link
Contributor

DavidS commented Apr 10, 2018

Thanks for you input, and patience, @MikaelSmith !

@puppetcla
Copy link

CLA signed by all contributors.

@DavidS DavidS merged commit 72e4502 into master Apr 11, 2018
@DavidS DavidS deleted the default-to-mocha-ugh branch April 11, 2018 14: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.

5 participants