Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

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

Merged
myronmarston merged 1 commit intomasterfrom
less-namespace-squatting
Nov 9, 2013
Merged

Squat on less of the user's method namespace.#459
myronmarston merged 1 commit intomasterfrom
less-namespace-squatting

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants