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

Can I mock view controllers? #52

Closed
wowbroforce opened this issue Jul 27, 2016 · 1 comment
Closed

Can I mock view controllers? #52

wowbroforce opened this issue Jul 27, 2016 · 1 comment

Comments

@wowbroforce
Copy link

Hi.
I've tried to use this pod for mocking view controllers but I got a lot of errors in generated mock file. For example, if I create a subclass of UIViewController, I will have two errors:

Initializer does not override a designated initializer from its superclass
'required' initializer 'init(coder:)' must be provided by subclass of 'DetailsRegistrationController'

And I want to clarify - do I need to write some additional code to get things work or it is currently impossible?

@TadeasKriz
Copy link
Member

@wowbroforce Hi, please try the new release 0.7.0, it might fix the problem. However it will not work if your controller has no declared initializers. We are currently unable to detect the grandparent declarations.

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

3 participants