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

have serializable mocks #683

Open
jasontrublu opened this Issue Jan 5, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@jasontrublu

Issue description

We are testing a framework that needs all injected objects to be serialisable (Google cloud sdk), so currently we cannot use spock mocks and have to create stub classes ourselves. Would it be possible to create mocks that can implement Serializable?

@leonard84

This comment has been minimized.

Show comment
Hide comment
@leonard84

leonard84 Mar 2, 2017

Member

Spock currently doesn't support to add additional interfaces to mocks, furthermore it would not work if they where actually serialized/deserialzed, since they would not be attached to the specification anymore.

Member

leonard84 commented Mar 2, 2017

Spock currently doesn't support to add additional interfaces to mocks, furthermore it would not work if they where actually serialized/deserialzed, since they would not be attached to the specification anymore.

@leonard84

This comment has been minimized.

Show comment
Hide comment
@leonard84

leonard84 Sep 21, 2017

Member

@jasontrublu with #752 spock supports the addition of interfaces for mocks. You can try the 1.2-SNAPSHOT. However, really serializing and deserializing a mock wont work.

Member

leonard84 commented Sep 21, 2017

@jasontrublu with #752 spock supports the addition of interfaces for mocks. You can try the 1.2-SNAPSHOT. However, really serializing and deserializing a mock wont work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment