Comments (3)
Closing and documenting in the wiki instead: https://github.com/eproxus/meck/wiki#feature-ideas
Please comment here if you have information or requests to add, and/or want to discuss a PR or possible implementation proposal.
from meck.
@eproxus has any work been done on this? Am interested to know the updates as I don't think there's anything for this right now. Also, the links to the issues on wiki are pointing to incorrect links and have to include meck
in the url. I believe this is the way to make it possible to run tests in parallel even if they are mocking the same modules.
I would be interested to look at this by looking at how it is right now and what can be done but might need some assistance.
from meck.
@techgaun No, no work has been done so far. The only way to current achieve this is to create your own fun which checks the calling process (the fun runs in the process that calls the mock, so it should be able to use self()
and then do something special, otherwise call meck:passthrough()
).
As for an official solution, I see two options:
- Deal with this in the mock process (i.e. the official solution of the workaround above)
- Actually change the calling module, which is much trickier and needs it's own management (monitoring process, backup, etc.).
(2) of course then limits the calls to only work from a certain module, but I think this is the better option anyway. This is also the only reliable way to mock "system" and ENIF/driver modules such as gen_tcp
etc. It is way more complex than (1), but I'm also not keen on implementing (1) since it can be implemented quite easily manually anyway (it might be a good candidate for an external helper library for Meck).
(Thanks for notifying be about the broken links, I've fixed them)
from meck.
Related Issues (20)
- Issues with interaction of meck with cover + eunit HOT 5
- Module references in typespecs are not included when renaming modules HOT 2
- Warnings in cover server when mecking distributed nodes with rebar3 do eunit,ct HOT 2
- meck:ret_spec() opaqueness violates documented usage patterns HOT 4
- Can not unload after passthrough meck HOT 3
- merge_expects together with passthrough seems does not set up the mocking HOT 2
- Getting meck_proc already started errors HOT 7
- References to hamcrest yield dialyzer warnings HOT 2
- Release request HOT 3
- One of the example shown on README page doesn't work HOT 2
- Update GitHub Actions to use setup-beam HOT 2
- Create proper issue templates
- Compilation results in files under deps/meck being updated HOT 3
- How to install on windows(win10) HOT 1
- How to install meck on windows HOT 2
- Deleting existing function does not work HOT 1
- List of expected functions for mocked module
- New release for erlang 27 HOT 1
- Erlang 27 Compatibility with Cover HOT 1
- Promote meck_history:result to meck API...? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meck.