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

stubbee -> stubba_object, mock_owner -> stubbee #463

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nitishr
Copy link
Contributor

@nitishr nitishr commented Jan 17, 2020

Rename: stubbee -> stubba_object, mock_owner -> stubbee

stubbee is the thing that's stubbed - more specifically, the object on
which .stubs or .mocks is called. (Therefore, it's also the object that
holds a reference to mocha. That's why it was called mock_owner earlier.
But that's an implementation detail that doesn't have to reflect in the
naming)

stubba_object is the object through which we get hold of the
stubba_class on which stubbed methods reside. In case of AnyInstance,
that class is the stubba_object itself, while in case of Instance, it's
the singleton class of the stubba_object.

This is consistent with the meaning and usage of stubba_object and
stubba_class methods in ObjectMethods and AnyInstance.

stubbee is the thing that's stubbed - more specifically, the object on
which .stubs or .mocks is called. Therefore, it's also the object that
holds a reference to mocha. That's why it was called mock_owner earlier.

stubba_object is the object through which we get hold of the
stubba_class on which stubbed methods reside. In case of AnyInstance,
that class is the stubba_object itself, while in case of Instance, it's
the singleton class of the stubba_object.
@floehopper
Copy link
Member

@nitishr Sorry for the slow response - I've been busy with client work. Thanks for all your ongoing work on Mocha. I'll take a look at all your open PRs as soon as I can.

@nitishr
Copy link
Contributor Author

nitishr commented Jan 20, 2020

Sure, no rush. If I can do anything to make it easier, please let me know.

@floehopper floehopper changed the base branch from master to main July 24, 2020 16:38
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.

2 participants