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

New Strategy: Spy which can imitate the interface of an instance of a given class without instantiation #7

Open
4 tasks
acook opened this issue Apr 9, 2021 · 0 comments

Comments

@acook
Copy link
Owner

acook commented Apr 9, 2021

Use case:

  • To mock objects which have a high instantiation cost or utilize I/O
  • Database and file objects

Criteria:

  • Spy accepts a class as target
  • Class is never instantiated
  • Spy responds to methods that an instance of the class would
  • Spy raises for methods that an instance of the class doesn't respond to

Extracted from #6

@acook acook changed the title New Strategy: Spy which can imitate the interface of an instance of a given class without intiantiation New Strategy: Spy which can imitate the interface of an instance of a given class without instantiation Oct 7, 2021
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

1 participant