From d3996822da7991b328bc16f37b69a31b7f6ea4a3 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 21 Jan 2024 06:54:44 +0100 Subject: [PATCH] fix rubocop offenses --- test/unit/additionals_fontawesome_test.rb | 2 +- test/unit/additionals_info_test.rb | 2 +- test/unit/core_ext_test.rb | 2 +- test/unit/i18n_test.rb | 4 ++-- test/unit/redmine_access_control_test.rb | 2 +- test/unit/redmine_plugin_kit_loader_test.rb | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/unit/additionals_fontawesome_test.rb b/test/unit/additionals_fontawesome_test.rb index 5de8269f..6d1e6df7 100644 --- a/test/unit/additionals_fontawesome_test.rb +++ b/test/unit/additionals_fontawesome_test.rb @@ -21,7 +21,7 @@ def setup def test_value_info_should_return_infos info = AdditionalsFontAwesome.value_info 'invalid' - assert info.is_a? Hash + assert_kind_of Hash, info assert_empty info info = AdditionalsFontAwesome.value_info 'fas_car' diff --git a/test/unit/additionals_info_test.rb b/test/unit/additionals_info_test.rb index 2baea9c7..7e10311a 100644 --- a/test/unit/additionals_info_test.rb +++ b/test/unit/additionals_info_test.rb @@ -6,7 +6,7 @@ class AdditionalsInfoTest < Additionals::TestCase def test_system_infos infos = AdditionalsInfo.new.system_infos - assert infos.is_a? Hash + assert_kind_of Hash, infos assert_operator infos.count, :>=, 3 end diff --git a/test/unit/core_ext_test.rb b/test/unit/core_ext_test.rb index e348a374..03bbe732 100644 --- a/test/unit/core_ext_test.rb +++ b/test/unit/core_ext_test.rb @@ -16,7 +16,7 @@ def test_strip_split_with_custom_sep end def test_strip_split_with_empty_string - assert ''.strip_split.is_a? Array + assert_kind_of Array, ''.strip_split assert_empty ''.strip_split end diff --git a/test/unit/i18n_test.rb b/test/unit/i18n_test.rb index e4f4a412..82515eed 100644 --- a/test/unit/i18n_test.rb +++ b/test/unit/i18n_test.rb @@ -15,8 +15,8 @@ def teardown end def test_valid_languages - assert valid_languages.is_a?(Array) - assert valid_languages.first.is_a?(Symbol) + assert_kind_of Array, valid_languages + assert_kind_of Symbol, valid_languages.first end def test_locales_validness diff --git a/test/unit/redmine_access_control_test.rb b/test/unit/redmine_access_control_test.rb index 81543dcc..0413d093 100644 --- a/test/unit/redmine_access_control_test.rb +++ b/test/unit/redmine_access_control_test.rb @@ -13,7 +13,7 @@ def setup end def test_available_project_modules_all - assert Redmine::AccessControl.available_project_modules_all.is_a? Array + assert_kind_of Array, Redmine::AccessControl.available_project_modules_all end def test_disabled_project_modules diff --git a/test/unit/redmine_plugin_kit_loader_test.rb b/test/unit/redmine_plugin_kit_loader_test.rb index 986221db..b6c03137 100644 --- a/test/unit/redmine_plugin_kit_loader_test.rb +++ b/test/unit/redmine_plugin_kit_loader_test.rb @@ -137,13 +137,13 @@ def test_do_not_allow_helper_if_controller_patch_exists_as_hash def test_load_model_hooks hooks = RedminePluginKit::Loader.new(plugin_id: @plugin_id).load_model_hooks! - assert hooks.is_a? Module + assert_kind_of Module, hooks end def test_load_hooks hooks = RedminePluginKit::Loader.new(plugin_id: @plugin_id).load_view_hooks! - assert hooks.is_a? Module + assert_kind_of Module, hooks end def test_load_macros