diff --git a/.rubocop.yml b/.rubocop.yml index 01608ab60..1a05e4577 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,7 @@ require: - rubocop-performance - rubocop-rails - rubocop-rspec + - rubocop-rspec_rails AllCops: DisplayCopNames: true @@ -533,12 +534,6 @@ RSpec/BeNil: Enabled: true EnforcedStyle: be -RSpec/Capybara/FeatureMethods: - Enabled: true - EnabledMethods: - - scenario - - xscenario - RSpec/ContextMethod: Enabled: true @@ -546,6 +541,14 @@ RSpec/DescribedClass: Enabled: true EnforcedStyle: explicit +RSpec/Dialect: + Enabled: true + PreferredMethods: + background: :before + given: :let + given!: :let! + feature: :describe + RSpec/EmptyExampleGroup: Enabled: true Exclude: @@ -595,18 +598,6 @@ RSpec/NotToNot: RSpec/OverwritingSetup: Enabled: true -RSpec/Rails/HaveHttpStatus: - Enabled: true - -RSpec/Rails/InferredSpecType: - Enabled: true - -RSpec/Rails/NegationBeValid: - Enabled: true - -RSpec/Rails/TravelAround: - Enabled: true - RSpec/ReceiveMessages: Enabled: true @@ -634,6 +625,18 @@ RSpec/SpecFilePathSuffix: RSpec/VoidExpect: Enabled: true +RSpecRails/HaveHttpStatus: + Enabled: true + +RSpecRails/InferredSpecType: + Enabled: true + +RSpecRails/NegationBeValid: + Enabled: true + +RSpecRails/TravelAround: + Enabled: true + Security/Eval: Enabled: true diff --git a/Gemfile b/Gemfile index 136f95c74..30e0f482b 100644 --- a/Gemfile +++ b/Gemfile @@ -103,7 +103,8 @@ group :development do gem "rubocop-factory_bot", "~> 2.26.1", require: false gem "rubocop-performance", "~> 1.21.1", require: false gem "rubocop-rails", "~> 2.25.1", require: false - gem "rubocop-rspec", "~> 2.27.0", require: false + gem "rubocop-rspec", "~> 3.0.1", require: false + gem "rubocop-rspec_rails", "~> 2.30.0", require: false gem "rvm1-capistrano3", "~> 1.4.0", require: false gem "spring", "~> 4.2.1" gem "web-console", "~> 4.2.1" diff --git a/Gemfile.lock b/Gemfile.lock index d053f55bb..e6df7bb9c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -561,10 +561,11 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (2.27.0) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) + rubocop-rspec (3.0.3) + rubocop (~> 1.61) + rubocop-rspec_rails (2.30.0) + rubocop (~> 1.61) + rubocop-rspec (~> 3, >= 3.0.1) ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) ruby-vips (2.1.4) @@ -770,7 +771,8 @@ DEPENDENCIES rubocop-factory_bot (~> 2.26.1) rubocop-performance (~> 1.21.1) rubocop-rails (~> 2.25.1) - rubocop-rspec (~> 2.27.0) + rubocop-rspec (~> 3.0.1) + rubocop-rspec_rails (~> 2.30.0) rvm1-capistrano3 (~> 1.4.0) sassc-embedded (~> 1.70.1) sassc-rails (~> 2.1.2)