Constrain null-object verifying doubles according to their defined interface #392

Closed
myronmarston opened this Issue Aug 6, 2013 · 6 comments

Projects

None yet

3 participants

Owner

More discussion:

#227 (comment)

Contributor
mikegee commented Aug 30, 2013

Since the pull request is merged, should this issue still be open?

Owner

No. #378 added verifying doubles but it doesn't constrain null-object doubles according to them.

Owner

@xaviershay Do you want to take a stab at this?

Member

I'll take out a 7 day lock on it and see how my week goes :)

@xaviershay xaviershay added a commit to xaviershay/rspec-mocks that referenced this issue Sep 25, 2013
@xaviershay xaviershay Verifying null objects only respond to defined methods.
* Delegated logic from the double to the proxy, since it is near by and
  already knows how to check if a method is implemented.
* No additional documentation, since this is the least surprising
  behaviour.
* Not sufficient duplication to warrant DRYing up the verifying method_missing
  implementations, if these classes start to look any more alike I would
  consider it though.
* verify_method_missing is a terrible method name, but I wanted to tell
  rather than ask rather than including the null object conditional in
  the method_missing implementation.

Fixes #392.
d9121a2
Member

@myronmarston see attached PR.

Owner

Closing to focus conversation on #421.

@xaviershay xaviershay added a commit to xaviershay/rspec-mocks that referenced this issue Sep 25, 2013
@xaviershay xaviershay Verifying null objects only respond to defined methods.
* No additional documentation, since this is the least surprising
  behaviour.

Fixes #392.
538f524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment