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

Squat on less of the user's method namespace. #459

Merged
merged 1 commit into from
Nov 9, 2013

Conversation

myronmarston
Copy link
Member

RSpec::Mocks::ExampleMethods is mixed into a context
where users freely define their own methods. As such,
it's best to not define private helper methods as the
user may inadvertently overwrite them. These methods
were all stateless, anyway, so they work equally well
as class methods and this creates less surface area
for override problems.

RSpec::Mocks::ExampleMethods is mixed into a context
where users freely define their own methods.  As such,
it's best to not define private helper methods as the
user may inadvertently overwrite them. These methods
were all stateless, anyway, so they work equally well
as class methods and this creates less surface area
for override problems.
@soulcutter
Copy link
Member

This seems like a positive change, although I would be surprised to see users running into conflicts with those names (grin).

myronmarston added a commit that referenced this pull request Nov 9, 2013
Squat on less of the user's method namespace.
@myronmarston myronmarston merged commit 513a794 into master Nov 9, 2013
@myronmarston myronmarston deleted the less-namespace-squatting branch November 9, 2013 13:55
@myronmarston
Copy link
Member Author

I would be, too. I'm also surprised that any users define let(:send)...but yet some users do.

@JonRowe
Copy link
Member

JonRowe commented Nov 10, 2013

👍

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.

None yet

3 participants