Skip to content

Commit 1023d57

Browse files
committed
Allow def test_... lines to be long
We currently allow lines like test "a really really ... really long test name" do using the Active Support declarative test style to violate `Layout/LineLength`. It stands to reason we should also allow the equivalent Minitest style def test_a_really_really_..._really_long_test_name
1 parent f9e6764 commit 1023d57

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Layout/LineEndStringConcatenationIndentation:
6666
Layout/LineLength:
6767
AllowedPatterns:
6868
- "\\A\\s*(remote_)?test(_\\w+)?\\s.*(do|->)(\\s|\\Z)"
69+
- "\\A\\s*def test_\\w+\\s*\\Z"
6970

7071
Layout/MultilineArrayLineBreaks:
7172
Enabled: true

test/fixtures/full_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ Layout/LineLength:
717717
IgnoreCopDirectives: true
718718
AllowedPatterns:
719719
- "\\A\\s*(remote_)?test(_\\w+)?\\s.*(do|->)(\\s|\\Z)"
720+
- "\\A\\s*def test_\\w+\\s*\\Z"
720721
IgnoredPatterns: []
721722
Layout/MultilineArrayBraceLayout:
722723
Description: Checks that the closing brace in an array literal is either on the

0 commit comments

Comments
 (0)