Comments (10)
I guess missed that part
Thanks for explaining!
from mecks_unit.
Hey, there. I'll take a look at it this weekend
from mecks_unit.
Hey again, have given this any thought?
from mecks_unit.
I guess I have read your description incorrectly. The resulting behaviour is as expected. See also the README:
Please note that the defined mock modules only apply to the first mocked_test encountered. So they are isolated (despite of :meck having an unfortunate global effect) as MecksUnit takes care of it. Also, non-matching function heads within the mock module will result in invoking the original module function as well.
I had to change
assert Mocked.func2() === : returns_from_mocking
to
assert Mocked.func2() === :returns_from_module_a
to get the build succeeding (see: https://travis-ci.org/archan937/mecks_unit)
from mecks_unit.
Hey again @archan937 , can I propose as a feature for the library to give the option of choosing whether to apply the mocks to all the mocked_test
s or just the first?
from mecks_unit.
Sure. I will add this later on this week. Keep an eye out! ;)
from mecks_unit.
That's great!
Thanks a lot đ
from mecks_unit.
Hey, @aalepis . It is a week later than promised but I have added the ability to "preserve" mock module definitions for the rest of the test case.
This has been release in MecksUnit v0.1.7 :)
For more information, please see https://github.com/archan937/mecks_unit#define-mock-module-for-entire-test-case and also 4219017
from mecks_unit.
Thank you very much @archan937, I really appreciate it!
from mecks_unit.
You're welcome, @aalepis. I hope it can help you further ;)
from mecks_unit.
Related Issues (5)
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 mecks_unit.