-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix setup-mocks and with-mocks original binding reinstantiation
A regression was caused by #28, such that the original binding values would be called when put back (due to the change to always reinstantiate the mocks for each test case). This wasn't covered by the tests and for non-side-effecting functions, this wouldn't surface, but for non-functions and for side-effecting functions, calling the original function could cause issues. This commit fixes that by wrapping the original binding values in functions just like the mocks. This commit also adds some useful comments and renames binding symbols since every time I look at `with-scoped-redefs` I get confused since the function was basically copied from `with-redefs`, and the naming there is a bit terse. Fixes #44.
- Loading branch information
Showing
2 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters