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

Allow described_class in specs #49

Merged
merged 1 commit into from
Dec 6, 2016
Merged

Conversation

toddmohney
Copy link
Contributor

described_class makes it easier to change the name/namespace of the class. (think 'make it easy to do the right thing' where the 'right thing' here is refactoring to a better name)

Lowering the barrier to this type of change will make it easier for us to correct domain debt.

@maxjacobson
Copy link
Contributor

I'm personally on board with it but curious to hear why people weren't in the past.

Do you think we should prescribe that we do use it, or just allow that we may use it?

If we want to prescribe it, we should start using rubocop-rspec, which has a cop for this: https://github.com/backus/rubocop-rspec/blob/master/lib/rubocop/cop/rspec/described_class.rb

@pbrisbin
Copy link
Contributor

I'm OK with allowing folks that want to to use described_class. I don't think we should prescribe that they must.

@toddmohney toddmohney merged commit 7a71d2e into master Dec 6, 2016
@toddmohney toddmohney deleted the tm-described-class-is-great branch December 6, 2016 22:20
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.

3 participants