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

Don't worry about ambiguous blocks in RSpec #3

Merged
merged 1 commit into from
May 26, 2017

Conversation

koppen
Copy link
Member

@koppen koppen commented May 26, 2017

Rubocop 0.48 introduced a new Lint/AmbiguousBlockAssocation cop 1, which
guards against the issues detailed in
rubocop/rubocop#3931.

However, the pattern is a solid RSpec idiom and not likely to cause the problems
Lint/AmbigiousBlockAssociation attempts to guard against. For example:

expect { foo }.to change { bar }

so we'll just ignore it in RSpec as suggested in
rubocop/rubocop#4222.

Rubocop 0.48 introduced a new Lint/AmbiguousBlockAssocation cop [1], which
guards against the issues detailed in
rubocop/rubocop#3931.

However, the pattern is a solid RSpec idiom and not likely to cause the problems
Lint/AmbigiousBlockAssociation attempts to guard against. For example:

    expect { foo }.to change { bar }

so we'll just ignore it in RSpec as suggested in
rubocop/rubocop#4222.

[1]: https://github.com/bbatsov/rubocop/blob/d1b9d66c3518389b0c408a6a4a42061b36748df4/relnotes/v0.48.0.md
@olepalm olepalm merged commit 4ae060c into master May 26, 2017
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.

2 participants