-
Notifications
You must be signed in to change notification settings - Fork 225
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
BoltSpec's expect_plan()
doesn't match _catch_error
parameter
#3298
Comments
Are you trying to test whether or not bolt/bolt-modules/boltlib/lib/puppet/functions/run_plan.rb Lines 67 to 68 in 8266293
So if i have a plan that expects a single parameters So for you example, the expect should be:
The expectation in this case is specifically what parameters are provided to the sub plan. |
The plan under the test must have |
While the explained behavior is discuss-able, I'd prefer to see this stated explicitly in the documentation (if not done yet).. It'd save me few hours of try-and-fail game... |
Describe the Bug
When trying to mock a
run_plan()
call with BoltSpec'sexpect_plan()
it seems that_catch_error
parameter is ignored completely.Expected Behavior
I'd expect
expect_plan()
to expect the_catch_error
parameter to match the expectation 😄Steps to Reproduce
Imagine PDK-managed
example
module with the following:example/plans/test.pp
:example/spec/plans/test_spec.rb
:Now let's run the test:
You'll see the following
With the
expect_plan
above commented out following error is raised:Here it's clear that
_catch_error
parameter is not even considered while matching (as I read it).Environment
The text was updated successfully, but these errors were encountered: