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

Avoid using {...} for multi-line blocks in Rspec change block #376

Closed
unforced opened this issue Jul 18, 2013 · 1 comment · Fixed by #378
Closed

Avoid using {...} for multi-line blocks in Rspec change block #376

unforced opened this issue Jul 18, 2013 · 1 comment · Fixed by #378
Assignees
Labels

Comments

@unforced
Copy link

In Rspec, a change block is required to use {...} instead of do...end. However, rubocop still warns about this.

@jonas054
Copy link
Collaborator

This is basically the same problem as in #373, but with an extra twist. Since these change blocks can look something like:

expect { Counter.increment }.to change {
  Counter.count
}.from(0).to(1)

There are two methods named to, something that my current solution in #378 can't handle. I'll take this case into consideration and make a better solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants