Sourcery icon indicating copy to clipboard operation
Sourcery copied to clipboard

Added ability to wrap mocks under define

Open pavel-trafimuk opened this issue 2 years ago • 3 comments

Currently mocks don't have ability to be hidden for some purposes, e.g. release/production. Yes, we can generate them only in unit-test targets, but this approach does not work in multi-modules real app: when I want mocks from moduleA in tests of moduleB and moduleC.

So it's better to put generated mocks in moduleA, but wrap them under define, so they will not expose in release code. To do that, I add new optional argument mockWrapDefine

pavel-trafimuk avatar Feb 24 '23 17:02 pavel-trafimuk

1 Error
:no_entry_sign: Any changes to library code need a summary in the Changelog.

Generated by :no_entry_sign: Danger

SourceryBot avatar Feb 24 '23 17:02 SourceryBot

@pavel-trafimuk mind adding info to the template docs?

krzysztofzablocki avatar Feb 28 '23 11:02 krzysztofzablocki

Please let me few days to update this MR

pavel-trafimuk avatar Apr 05 '24 08:04 pavel-trafimuk