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

Document more preferred spec styles #56

Merged
merged 1 commit into from
Feb 10, 2017
Merged

Document more preferred spec styles #56

merged 1 commit into from
Feb 10, 2017

Conversation

pbrisbin
Copy link
Contributor

@pbrisbin pbrisbin commented Feb 9, 2017

No description provided.

ruby/README.md Outdated

```rb
# Good
expect(x).to eq y
Copy link
Contributor

@wfleming wfleming Feb 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually prefer the opposite style: I do not like Ruby's inconsistency around parens and prefer to always have parens for method calls (with grumpy exceptions made for some cases like template helpers/macro-y things like attr_reader). My personal reasoning is similar to why we always do , after the last arg for multi-line formatting: the diff tends to be cleaner when it changes, and you're less likely to accidentally break something just because you forgot to add parens.

But I will defer if there's a general preference for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slack poll: https://codeclimate.slack.com/archives/dev/p1486663111011158

So far expect(x).to eq(y) is winning.

@pbrisbin pbrisbin merged commit 6366cf3 into master Feb 10, 2017
@pbrisbin pbrisbin deleted the pb/expect-stuffs branch February 10, 2017 20:01
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