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

Adds default parameter set to New-MockObject #2160

Merged

Conversation

phoerr
Copy link
Contributor

@phoerr phoerr commented Apr 21, 2022

PR Summary

Fix #2158

Adds DefaultParameterSetName value to New-MockObject for backwards compatibility for versions before 5.3.0.

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
  • Tests are added/update
  • Documentation is updated/added (not required)

Philip Hoerr added 5 commits April 15, 2022 16:41
Use DefaultParameterSetName of Type for backwards compatability.
Use DefaultParameterSetName of Type for backwards compatibility.
To make New-MockObject $type work without adding -Type, the Position = 0 is needed.
Otherwise, you get the error: "A positional parameter cannot be found that accepts argument"
…com:phoerr/Pester into add-default-parameter-set-to-new-mockobject
@phoerr phoerr marked this pull request as ready for review April 21, 2022 21:41
@nohwnd nohwnd merged commit 105e60f into pester:main Apr 22, 2022
@phoerr phoerr deleted the add-default-parameter-set-to-new-mockobject branch April 22, 2022 18:54
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.

Add default parameter set to New-MockObject for backward compatibility.
2 participants