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

Add ability to use a stub to overwrite a method #7

Open
oxinabox opened this issue Jul 11, 2018 · 1 comment
Open

Add ability to use a stub to overwrite a method #7

oxinabox opened this issue Jul 11, 2018 · 1 comment

Comments

@oxinabox
Copy link
Owner

Right now stubs never overwrite methods.

But it would be quiet possible to have a:

something like overwrite(module, stub),
that would iterate through each signature a sub accepts
and call @eval(module, $stub.name(<ARGSSIG>)=stub(<ARGS>)

But I think this can wait until Cassette based Mocking.jl arrives; so as to ensure it will be compatible with that, rather than unrecoverably overwritting every method

@omus
Copy link

omus commented Jul 20, 2018

See JuliaTesting/Mocking.jl#53

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

No branches or pull requests

2 participants