]> git.openstreetmap.org Git - rails.git/commitdiff
Add rubocop-minitest
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Apr 2020 14:15:52 +0000 (16:15 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Apr 2020 14:15:52 +0000 (16:15 +0200)
.rubocop.yml
.rubocop_todo.yml
Gemfile
Gemfile.lock

index 1c41c027a68b40d4e79fb07f081cd891ae31a731..34605df1d8b821fe083d88b8caa07a3ea222562b 100644 (file)
@@ -1,6 +1,7 @@
 inherit_from: .rubocop_todo.yml
 
 require:
+  - rubocop-minitest
   - rubocop-performance
   - rubocop-rails
 
index 06a9c76f07b2ac4dcf2752113aa2cfee8dc5f45b..a5a160a021c7248606e842f2d6ffdd3785c417c6 100644 (file)
@@ -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 7c96217346a29af732c925d31f4258d8047b0c59..d04996b933c6a8a843bd6f7bbed7c1e1723ac267 100644 (file)
--- 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"
index 80c30dc5befeba2eb7ca35c12c4d9a49b6317d6a..49a843a035a10024125e9777514baedf142f17ae 100644 (file)
@@ -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