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

Add Implicit Block Expectation guideline #103

Merged
merged 1 commit into from Jul 24, 2019

Conversation

@pirj
Copy link
Member

commented Jul 23, 2019

Implicit syntax is discouraged to use by RSpec Core team and the majority of voters.

There were no good arguments for using the syntax except for brevity and avoiding repetition, but there are better options to achieve the same goal, e.g. by extracting the lengthy block to methods (instead of putting it inside the lambda).

Fixes #76

Better viewed as https://github.com/rubocop-hq/rspec-style-guide/blob/add-implicit-block-expectation-guideline/README.adoc#implicit-block-expectations

References:
https://www.reddit.com/r/ruby/comments/cejl3q/call_for_discussion_rspec_implicit_block/
https://blog.rubystyle.guide/rspec/2019/07/17/rspec-implicit-block-syntax.html
#76
https://lobste.rs/s/e8yxmd/call_for_discussion_rspec_implicit_block

@pirj pirj self-assigned this Jul 23, 2019

Add Implicit Block Expectation guideline
Implicit syntax is discouraged to use by RSpec Core team and the
majority of voters.

There were no good arguments for using the syntax except for brevity and
avoiding repetition, but there are better options to achieve the same
goal, e.g. by extracting the lengthy block to methods (instead of
putting it inside the lambda).

Fixes #76

https://www.reddit.com/r/ruby/comments/cejl3q/call_for_discussion_rspec_implicit_block/
https://blog.rubystyle.guide/rspec/2019/07/17/rspec-implicit-block-syntax.html
#76

@pirj pirj force-pushed the add-implicit-block-expectation-guideline branch from 2c9bd6f to 484de61 Jul 23, 2019

@pirj pirj requested review from andyw8 and Darhazer Jul 23, 2019

@pirj pirj referenced this pull request Jul 23, 2019
8 of 8 tasks complete

@pirj pirj merged commit 7c53a26 into master Jul 24, 2019

1 check passed

ci/circleci: docs-build Your tests passed on CircleCI!
Details

@pirj pirj deleted the add-implicit-block-expectation-guideline branch Jul 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.