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 versioncmp to compare versions #49

Merged
merged 4 commits into from
Nov 20, 2014
Merged

Conversation

jfroche
Copy link
Contributor

@jfroche jfroche commented Nov 19, 2014

Using builtin function to compare versions in the watch define (https://docs.puppetlabs.com/references/latest/function.html#versioncmp)
I had to rewrite the related tests as well as they were always testing on the '0.4.1' consul::version. I used mocking on hiera to specify the needed version.
Thank you for taking care of this nice module !

@solarkennedy
Copy link
Contributor

Hmm. I'm not a super fan of the hiera mocks, mostly because I've been burned by the "one hiera mock per describe block"

You seem to get around that with with some extra spec help magic.... that I might steal... cc @mrtyler.

Another way you could have done this is with let(:pre_condition){} That would require a tad less magic, maybe. Its all good.

But, I'm going to merge this because it is super! And of course versioncmp, duh.

solarkennedy added a commit that referenced this pull request Nov 20, 2014
use versioncmp to compare versions
@solarkennedy solarkennedy merged commit f0ecab8 into voxpupuli:master Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants