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

Document that onRequest and completion must be set before calling register() #47

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

marcetcheverry
Copy link
Contributor

What may be even better is to throw an assertion if these two variables (and perhaps more), are called after calling register.

Other variables may be affected.

Right now it fails silently for these two.

@ghost
Copy link

ghost commented Mar 7, 2020

Warnings
⚠️

Consider to place some MARK: lines for Sources/Mock.swift, which is over 200 lines big.

Messages
📖

View more details on Bitrise

📖 Mocker: Executed 17 tests, with 0 failures (0 unexpected) in 1.712 (1.783) seconds

Mocker.framework: Coverage: 88.4

File Coverage
Mock.swift 84.44%

Generated by 🚫 Danger Swift against 708e9bd

Copy link
Contributor

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is from great value! Indeed, making it fail with a fatalError would be a lot better. We should be able to do this by verifying that the mock was registered already but we might run into issues due to the fact that we use a struct.

Feel free to open a contribution for this if you like. However, I'd like to stay with the struct over adding this functionality. So only if we can keep using structs, it's a welcome change!

@AvdLee AvdLee merged commit a7ddd48 into WeTransfer:master Mar 10, 2020
@ghost
Copy link

ghost commented May 25, 2020

Congratulations! 🎉 This was released as part of Release 2.2.0 🚀

Generated by GitBuddy

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

3 participants