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

Clean up mocks on start #1035

Merged
merged 15 commits into from
May 6, 2018
Merged

Clean up mocks on start #1035

merged 15 commits into from
May 6, 2018

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented May 6, 2018

Fix #913

When a test is stop in the middle of It and there are mocks in place the aliases and functions stay in place and are picked up on the next run which corrupts the state.

As a solution prefix PesterMock_ is added to the mock bootstrap function name, and all aliases pointing to a function with that prefix are deleted. The functions are deleted as well.

@nohwnd nohwnd merged commit 0ed8646 into pester:master May 6, 2018
@nohwnd nohwnd deleted the clean-up-mocks-on-start branch January 11, 2019 21:22
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.

Mock CommandName not correct
1 participant