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

[4/y] Enable mocking sources in test bundles #286

Merged

Conversation

andrewchang-bird
Copy link
Contributor

@andrewchang-bird andrewchang-bird commented Jan 27, 2022

Stack

πŸ“š #287 [5/y] Improve static mocking APIs
πŸ“š #286 ← [4/y] Enable mocking sources in test bundles
πŸ“š #285 [3/y] Fix read-only subscripts
πŸ“š #284 [2/y] Fix warnings in throwing initializers
πŸ“š #283 [1/y] Add backwards compatibility with Swift 5.5

Overview

It’s uncommon, but possible, to need to mock types defined in a test bundle. For example, one use case is supplying a common set of default implementations for partial mocking. A non-typical case is mocking types in test bundle A and using them in test bundle B, which is straightforward to set up in SwiftPM / JSON project descriptions but not so much with an Xcode project.

To simplify the automatic setup process and reduce potential user errors, the configurator will continue to validate that the configuration target is a test bundle and each source target is not a test bundle. Advanced users can modify the build phase manually to bypass this as needed.

Test Plan

Ran the generator against the MockingbirdTests target with various thunk pruning levels.

@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-readonly-subscripts branch from 5d87836 to 4b54adc Compare January 28, 2022 21:12
Base automatically changed from dev/andrewchang-bird/fix-readonly-subscripts to master January 28, 2022 21:14
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/enable-testbundle-mocking branch from ff3688c to 261063e Compare January 28, 2022 21:15
@andrewchang-bird andrewchang-bird merged commit 992699a into master Jan 28, 2022
@andrewchang-bird andrewchang-bird deleted the dev/andrewchang-bird/enable-testbundle-mocking branch January 28, 2022 21:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants