From 9b3a3a12f52eb5e5ad9c55c4c864ff1c95bcd1f3 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 15 Apr 2020 16:15:52 +0200 Subject: [PATCH] Add rubocop-minitest --- .rubocop.yml | 1 + .rubocop_todo.yml | 34 ++++++++++++++++++++++++++++++++++ Gemfile | 1 + Gemfile.lock | 3 +++ 4 files changed, 39 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 1c41c027a..34605df1d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,7 @@ inherit_from: .rubocop_todo.yml require: + - rubocop-minitest - rubocop-performance - rubocop-rails diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 06a9c76f0..a5a160a02 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -89,6 +89,40 @@ Metrics/ParameterLists: Metrics/PerceivedComplexity: Max: 25 +# Offense count: 2 +# Cop supports --auto-correct. +Minitest/AssertEmpty: + Exclude: + - 'test/controllers/api/amf_controller_test.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +Minitest/AssertEqual: + Exclude: + - 'test/controllers/api/amf_controller_test.rb' + +# Offense count: 27 +# Cop supports --auto-correct. +Minitest/AssertIncludes: + Exclude: + - 'test/controllers/api/amf_controller_test.rb' + - 'test/controllers/api/nodes_controller_test.rb' + - 'test/helpers/browse_helper_test.rb' + - 'test/lib/i18n_test.rb' + - 'test/models/node_test.rb' + - 'test/models/old_node_test.rb' + - 'test/models/user_test.rb' + +# Offense count: 104 +# Cop supports --auto-correct. +Minitest/AssertTruthy: + Enabled: false + +# Offense count: 110 +# Cop supports --auto-correct. +Minitest/RefuteFalse: + Enabled: false + # Offense count: 6 Naming/AccessorMethodName: Exclude: diff --git a/Gemfile b/Gemfile index 7c9621734..d04996b93 100644 --- a/Gemfile +++ b/Gemfile @@ -141,6 +141,7 @@ group :test do gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20] gem "rails-controller-testing" gem "rubocop" + gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-rails" gem "webmock" diff --git a/Gemfile.lock b/Gemfile.lock index 80c30dc5b..49a843a03 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -398,6 +398,8 @@ GEM rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) + rubocop-minitest (0.9.0) + rubocop (>= 0.74) rubocop-performance (1.5.2) rubocop (>= 0.71.0) rubocop-rails (2.5.1) @@ -538,6 +540,7 @@ DEPENDENCIES rinku (>= 2.0.6) rotp rubocop + rubocop-minitest rubocop-performance rubocop-rails sanitize -- 2.39.5