]> git.openstreetmap.org Git - rails.git/commitdiff
Fix new rubocop warnings
authorTom Hughes <tom@compton.nu>
Tue, 23 Jan 2024 18:14:28 +0000 (18:14 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 23 Jan 2024 18:14:28 +0000 (18:14 +0000)
.rubocop.yml
test/helpers/asset_helper_test.rb
test/lib/i18n_test.rb

index ddfb63cae0610942a1ac6f107267e2c283ea2b50..1e18afd83581ba0fc47d728032b3ade65f091b1a 100644 (file)
@@ -68,9 +68,6 @@ Rails/SkipsModelValidations:
     - 'db/migrate/*.rb'
     - 'app/controllers/users_controller.rb'
 
-Style/ArgumentsForwarding:
-  Enabled: false
-
 Style/Documentation:
   Enabled: false
 
index 8a4653b2527cb151b2c72dc3a8d52a6288e6e5b8..c255cc76627761a17333d59db8bad1195d5db65d 100644 (file)
@@ -2,6 +2,6 @@ require "test_helper"
 
 class AssetHelperTest < ActionView::TestCase
   def test_assets
-    assert assets("iD").is_a?(Hash)
+    assert_kind_of Hash, assets("iD")
   end
 end
index ea6e4ae27361a312915da3a4f81e85e2df3052b2..fe94cbdd3604e1de39d2b8505891d7fcd51a3cdb 100644 (file)
@@ -42,7 +42,7 @@ class I18nTest < ActiveSupport::TestCase
 
             assert_includes value, :other, "#{key}.other plural key missing"
           else
-            assert value.is_a?(String), "#{key} is not a string"
+            assert_kind_of String, value, "#{key} is not a string"
 
             value.scan(/%\{(\w+)\}/) do
               assert_includes variables, Regexp.last_match(1), "#{key} uses unknown interpolation variable #{Regexp.last_match(1)}"