-
Notifications
You must be signed in to change notification settings - Fork 134
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
Use global mock in adapters #158
Conversation
Instead of call `:mock.expect` whenever we use cassette, we can implement a global mocking on application startup and global storage for the recorder. Whenever we need to use a cassette, we can pass the recorder though `CurrentRecorder` GenServer.
Co-authored-by: Kanmaniselvan Murugesan <[email protected]>
Co-authored-by: Kanmaniselvan Murugesan <[email protected]>
Thanks for addressing this item (I could confirm the test completes faster with this change). |
Hi @parroty, thank you for checking it. I'm currently using this branch with an application that has quite extensive use of cassettes. Switching between upstream and my branch is only about a dependency reference change in Another potential thing that may happen if someone includes Shall I add a note to README.md about |
Thanks for the detailed description.
Can I request a note to the readme? (maybe just a simple note would be great). Then I'll be merging and push to hex. |
Thanks! |
It seems some tests are failing. I'll be looking to it too, but do you have insights on whether if it can have optional flag to partial disable the global mock? |
Instead of call
:meck.expect
whenever we use cassette, we can implement a global mocking on application startup and global storage for the recorder. Whenever we need to use a cassette, we can pass the recorder thoughCurrentRecorder
GenServer.