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

Feature-Request: Enable calling original implementation if no stub is provided. #185

Closed
winstondu opened this issue Jan 8, 2021 · 1 comment · Fixed by #217
Closed
Labels
enhancement Feature request or improvement

Comments

@winstondu
Copy link

Sometimes, I might just want to create a version of my concrete type that is the real object, except that the invocations of functions and the get/set of properties can be verified.

From a quick overview of the architecture, this seems totally feasible. This is because mocks of concrete types are created by Mockingbird via subclassing that concrete type.

Currently, whenever there is no stub of the desired/function/property provided for the mock class, fatalError(self.stubbingContext.failTest(for: invocation)) is called.

But we could also just use the actual implementation with just super call.

@andrewchang-bird
Copy link
Contributor

Partial mocks is in the works :) Both passing the call to the superclass as well as proxying an object that conforms to the mocked type.

@andrewchang-bird andrewchang-bird added the enhancement Feature request or improvement label Jul 2, 2021
@andrewchang-bird andrewchang-bird linked a pull request Aug 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants