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

EmptyLineBeforeAssertionMethods adds an empty line after an assertion with a block and before an assertion #210

Closed
adamzapasnik opened this issue Dec 29, 2022 · 2 comments · Fixed by #212
Labels
bug Something isn't working

Comments

@adamzapasnik
Copy link

EmptyLineBeforeAssertionMethods adds an empty line after an assertion with a block and before an assertion👇


Expected behavior

assert true
assert_raise ActiveRecord::RecordNotFound do
  something
end
assert true
assert_raise ActiveRecord::RecordNotFound do
  something

  assert true
end
assert true

Actual behavior

assert true
assert_raise ActiveRecord::RecordNotFound do
  something
end

assert true
assert_raise ActiveRecord::RecordNotFound do
  something

  assert true
end
assert true

RuboCop version

Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
You see extension cop versions (e.g. rubocop-minitest, rubocop-performance, and others) output by rubocop -V,
include them as well. Here's an example:

1.41.1 (using Parser 3.1.3.0, rubocop-ast 1.24.0, running on ruby 3.0.5) +server [arm64-darwin22]
  - rubocop-minitest 0.25.1
  - rubocop-rails 2.17.4
  - rubocop-thread_safety 0.4.4
@koic koic added the bug Something isn't working label Dec 30, 2022
koic added a commit to koic/rubocop-minitest that referenced this issue Dec 30, 2022
…ssertionMethodsTest`

Fixes rubocop#210.

This PR fixes a false positive for `Minitest/EmptyLineBeforeAssertionMethodsTest`
when using assertion method with block arg before other assertion method.
koic added a commit to koic/rubocop-minitest that referenced this issue Dec 30, 2022
…ssertionMethodsTest`

Fixes rubocop#210.

This PR fixes a false positive for `Minitest/EmptyLineBeforeAssertionMethodsTest`
when using assertion method with block arg before other assertion method.
@koic koic closed this as completed in #212 Jan 3, 2023
koic added a commit that referenced this issue Jan 3, 2023
…mpty_line_before_assertion_methods

[Fix #210] Fix a false positive for `Minitest/EmptyLineBeforeAssertionMethodsTest`
@adamzapasnik
Copy link
Author

thx @koic

@koic
Copy link
Member

koic commented Jan 3, 2023

@adamzapasnik You are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants