(Modules 3391) remove rake test
and fix failing test
#35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The bundle exec rake test command in the chocolatey Rakefile runs an incomplete set of tests with a missing dependency on
bundle exec rake spec_prep
. After further investigation, it turns outpuppetlabs_spec_helper
definesrake spec
which runs all the spec tests and does appropriate prep setup/teardown. After discussing with @glennsarti and @ThoughtCrhyme it seems like the correct call here is to runbundle exec rake spec
instead of extendingbundle exec rake test
to further duplicate it.This PR specifically just removes the
rake test
task from Rakefile to avoid further confusion. It is believed that since the module is pre-1.0 this change, which might be considered backwards-incompatible is acceptable. I'm happy to work up something more backwards-compatible via task redirection if we think that's appropriate.This PR also resolves a failing test:
This is because facter fact(s) were making a call to
Win32::Registry.[]
which hadn't been stubbed (two, in fact). This commit adds these stubs to the spec_helper in addition to the existing one. This makes test pass, but may be more brittle than a more generic stub that doesn't specify the parameter. I assume we prefer higher specificity, but I'm happy to revise to a single line with justWin32::Registry.any_instance.stubs(:[])
if preferred.Signed-off-by: Moses Mendoza [email protected]