Patch #38146 » 0001-Fix-RuboCop-offense-Performance-AncestorsInclude.patch
| .rubocop_todo.yml | ||
|---|---|---|
| 486 | 486 |
- 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb' |
| 487 | 487 |
- 'test/unit/project_test.rb' |
| 488 | 488 | |
| 489 |
# This cop supports unsafe autocorrection (--autocorrect-all). |
|
| 490 |
Performance/AncestorsInclude: |
|
| 491 |
Exclude: |
|
| 492 |
- 'test/unit/document_category_test.rb' |
|
| 493 |
- 'test/unit/issue_priority_test.rb' |
|
| 494 |
- 'test/unit/time_entry_activity_test.rb' |
|
| 495 | ||
| 496 | 489 |
# This cop supports safe autocorrection (--autocorrect). |
| 497 | 490 |
Performance/BlockGivenWithExplicitBlock: |
| 498 | 491 |
Exclude: |
| test/unit/document_category_test.rb | ||
|---|---|---|
| 27 | 27 |
end |
| 28 | 28 | |
| 29 | 29 |
def test_should_be_an_enumeration |
| 30 |
assert DocumentCategory.ancestors.include?(Enumeration)
|
|
| 30 |
assert DocumentCategory <= Enumeration
|
|
| 31 | 31 |
end |
| 32 | 32 | |
| 33 | 33 |
def test_objects_count |
| test/unit/issue_priority_test.rb | ||
|---|---|---|
| 49 | 49 |
end |
| 50 | 50 | |
| 51 | 51 |
def test_should_be_an_enumeration |
| 52 |
assert IssuePriority.ancestors.include?(Enumeration)
|
|
| 52 |
assert IssuePriority <= Enumeration
|
|
| 53 | 53 |
end |
| 54 | 54 | |
| 55 | 55 |
def test_objects_count |
| test/unit/time_entry_activity_test.rb | ||
|---|---|---|
| 37 | 37 |
end |
| 38 | 38 | |
| 39 | 39 |
def test_should_be_an_enumeration |
| 40 |
assert TimeEntryActivity.ancestors.include?(Enumeration)
|
|
| 40 |
assert TimeEntryActivity <= Enumeration
|
|
| 41 | 41 |
end |
| 42 | 42 | |
| 43 | 43 |
def test_objects_count |