mirror of
https://github.com/Growstuff/growstuff.git
synced 2025-12-24 01:57:46 -05:00
Improve rspec
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
inherit_from: .rubocop_todo.yml
|
||||
require: rubocop-rails
|
||||
require:
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
Exclude:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2022-11-07 12:52:07 UTC using RuboCop version 1.38.0.
|
||||
# on 2022-11-07 12:56:14 UTC using RuboCop version 1.38.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@@ -115,7 +115,7 @@ Metrics/AbcSize:
|
||||
Max: 151
|
||||
|
||||
# Offense count: 10
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode.
|
||||
# AllowedMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 61
|
||||
@@ -148,6 +148,344 @@ Naming/HeredocDelimiterCase:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
|
||||
# Offense count: 3
|
||||
RSpec/AnyInstance:
|
||||
Exclude:
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/controllers/photos_controller_spec.rb'
|
||||
|
||||
# Offense count: 78
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/BeEq:
|
||||
Exclude:
|
||||
- 'spec/controllers/admin/roles_controller_spec.rb'
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/features/members/deletion_spec.rb'
|
||||
- 'spec/features/unsubscribing_spec.rb'
|
||||
- 'spec/helpers/application_helper_spec.rb'
|
||||
- 'spec/lib/actions/oauth_signup_action_spec.rb'
|
||||
- 'spec/models/crop_spec.rb'
|
||||
- 'spec/models/garden_spec.rb'
|
||||
- 'spec/models/harvest_spec.rb'
|
||||
- 'spec/models/member_spec.rb'
|
||||
- 'spec/models/planting_spec.rb'
|
||||
- 'spec/models/post_spec.rb'
|
||||
- 'spec/models/seed_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnabledMethods.
|
||||
RSpec/Capybara/FeatureMethods:
|
||||
Exclude:
|
||||
- 'spec/features/shared_examples/crop_suggest.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: have_no, not_to
|
||||
RSpec/Capybara/NegationMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/crops/crop_wrangling_button_spec.rb'
|
||||
|
||||
# Offense count: 12
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/Capybara/SpecificFinders:
|
||||
Exclude:
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/plantings/prediction_spec.rb'
|
||||
|
||||
# Offense count: 15
|
||||
RSpec/Capybara/SpecificMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/crops/browse_crops_spec.rb'
|
||||
- 'spec/features/footer_spec.rb'
|
||||
- 'spec/features/gardens/adding_gardens_spec.rb'
|
||||
- 'spec/features/harvests/harvesting_a_crop_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/seeds/adding_seeds_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
RSpec/Capybara/VisibilityMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/shared_examples/crop_suggest.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: NegatedMatcher.
|
||||
RSpec/ChangeByZero:
|
||||
Exclude:
|
||||
- 'spec/models/comment_spec.rb'
|
||||
- 'spec/models/post_spec.rb'
|
||||
|
||||
# Offense count: 292
|
||||
# Configuration parameters: Prefixes, AllowedPatterns.
|
||||
# Prefixes: when, with, without
|
||||
RSpec/ContextWording:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: IgnoredMetadata.
|
||||
RSpec/DescribeClass:
|
||||
Exclude:
|
||||
- 'spec/models/like_spec.rb'
|
||||
- 'spec/models/member_spec.rb'
|
||||
- 'spec/services/timeline_service_spec.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/EmptyExampleGroup:
|
||||
Exclude:
|
||||
- 'spec/controllers/authentications_controller_spec.rb'
|
||||
- 'spec/controllers/forums_controller_spec.rb'
|
||||
- 'spec/controllers/home_controller_spec.rb'
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/controllers/plant_parts_controller_spec.rb'
|
||||
- 'spec/controllers/seeds_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_detail_page_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/requests/authentications_spec.rb'
|
||||
- 'spec/views/home/index_spec.rb'
|
||||
- 'spec/views/photos/edit.html.haml_spec.rb'
|
||||
- 'spec/views/posts/_single.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 78
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowConsecutiveOneLiners.
|
||||
RSpec/EmptyLineAfterExample:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 13
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/EmptyLineAfterExampleGroup:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/controllers/posts_controller_spec.rb'
|
||||
- 'spec/features/cms_spec.rb'
|
||||
- 'spec/features/crops/creating_a_crop_spec.rb'
|
||||
- 'spec/features/likeable_spec.rb'
|
||||
- 'spec/features/seeds/adding_seeds_spec.rb'
|
||||
- 'spec/features/timeline/index_spec.rb'
|
||||
- 'spec/models/planting_spec.rb'
|
||||
- 'spec/services/crop_search_service_spec.rb'
|
||||
|
||||
# Offense count: 51
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/EmptyLineAfterFinalLet:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 88
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowConsecutiveOneLiners.
|
||||
RSpec/EmptyLineAfterHook:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/EmptyLineAfterSubject:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/features/members/deletion_spec.rb'
|
||||
- 'spec/helpers/event_helper_spec.rb'
|
||||
- 'spec/services/crop_search_service_spec.rb'
|
||||
- 'spec/services/timeline_service_spec.rb'
|
||||
|
||||
# Offense count: 136
|
||||
# Configuration parameters: CountAsOne.
|
||||
RSpec/ExampleLength:
|
||||
Max: 25
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/ExcessiveDocstringSpacing:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
|
||||
# Offense count: 30
|
||||
RSpec/ExpectInHook:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/features/admin/forums_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/shared_examples/append_date.rb'
|
||||
|
||||
# Offense count: 447
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: require_parentheses, omit_parentheses
|
||||
RSpec/FactoryBot/ConsistentParenthesesStyle:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1135
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/FactoryBot/SyntaxMethods:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
||||
# Include: **/*_spec*rb*, **/spec/**/*
|
||||
RSpec/FilePath:
|
||||
Exclude:
|
||||
- 'spec/controllers/member_controller_spec.rb'
|
||||
- 'spec/features/seeds/seed_photos.rb'
|
||||
- 'spec/models/garden_type.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: implicit, each, example
|
||||
RSpec/HookArgument:
|
||||
Exclude:
|
||||
- 'spec/requests/api/v1/plantings_request_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/HooksBeforeExamples:
|
||||
Exclude:
|
||||
- 'spec/features/crops/creating_a_crop_spec.rb'
|
||||
|
||||
# Offense count: 710
|
||||
# Configuration parameters: AssignmentOnly.
|
||||
RSpec/InstanceVariable:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 9
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/LeadingSubject:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_detail_page_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/seeds/seed_photos.rb'
|
||||
- 'spec/helpers/event_helper_spec.rb'
|
||||
- 'spec/models/planting_spec.rb'
|
||||
- 'spec/models/seed_spec.rb'
|
||||
- 'spec/services/timeline_service_spec.rb'
|
||||
|
||||
# Offense count: 40
|
||||
RSpec/LetSetup:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/MessageChain:
|
||||
Exclude:
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 23
|
||||
# Configuration parameters: .
|
||||
# SupportedStyles: have_received, receive
|
||||
RSpec/MessageSpies:
|
||||
EnforcedStyle: receive
|
||||
|
||||
# Offense count: 1
|
||||
RSpec/MultipleDescribes:
|
||||
Exclude:
|
||||
- 'spec/features/crops/crop_wranglers_spec.rb'
|
||||
|
||||
# Offense count: 149
|
||||
RSpec/MultipleExpectations:
|
||||
Max: 19
|
||||
|
||||
# Offense count: 137
|
||||
# Configuration parameters: AllowSubject.
|
||||
RSpec/MultipleMemoizedHelpers:
|
||||
Max: 14
|
||||
|
||||
# Offense count: 132
|
||||
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
||||
# SupportedStyles: always, named_only
|
||||
RSpec/NamedSubject:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 111
|
||||
# Configuration parameters: AllowedGroups.
|
||||
RSpec/NestedGroups:
|
||||
Max: 6
|
||||
|
||||
# Offense count: 410
|
||||
# Configuration parameters: AllowedPatterns.
|
||||
# AllowedPatterns: ^expect_, ^assert_
|
||||
RSpec/NoExpectationExample:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/Rails/HaveHttpStatus:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/v1/plantings_controller_spec.rb'
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/requests/harvests_spec.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Inferences.
|
||||
RSpec/Rails/InferredSpecType:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/RepeatedDescription:
|
||||
Exclude:
|
||||
- 'spec/models/like_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
RSpec/RepeatedExample:
|
||||
Exclude:
|
||||
- 'spec/controllers/photos_controller_spec.rb'
|
||||
- 'spec/features/members/following_spec.rb'
|
||||
- 'spec/models/like_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
RSpec/RepeatedExampleGroupBody:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/ScatteredLet:
|
||||
Exclude:
|
||||
- 'spec/features/members/deletion_spec.rb'
|
||||
- 'spec/features/members/profile_spec.rb'
|
||||
- 'spec/views/photos/show.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
RSpec/ScatteredSetup:
|
||||
Exclude:
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
- 'spec/features/plantings/prediction_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/SortMetadata:
|
||||
Exclude:
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
- 'spec/views/home/_seeds.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
RSpec/StubbedMock:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: constant, string
|
||||
RSpec/VerifiedDoubleReference:
|
||||
Exclude:
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
||||
RSpec/VerifiedDoubles:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/views/devise/shared/_links_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/ActionControllerFlashBeforeRender:
|
||||
|
||||
Reference in New Issue
Block a user