From 67ab8b4346f69d80ef6563b6269355adc41c472c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 21 Jun 2023 17:17:19 +0900 Subject: [PATCH] [rubygems/rubygems] Fix argument order of `assert_equal` https://github.com/rubygems/rubygems/commit/a7c015f82b --- test/rubygems/test_gem_update_suggestion.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/rubygems/test_gem_update_suggestion.rb b/test/rubygems/test_gem_update_suggestion.rb index f74349fe24b52c..835a2d84f107fe 100644 --- a/test/rubygems/test_gem_update_suggestion.rb +++ b/test/rubygems/test_gem_update_suggestion.rb @@ -69,7 +69,7 @@ def test_eglible_for_update with_eglible_environment(cmd: @cmd) do Time.stub :now, 123_456_789 do assert @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, 123_456_789 + assert_equal 123_456_789, Gem.configuration.last_update_check # test last check is written to config file assert File.read(Gem.configuration.state_file_name).match("123456789") @@ -86,7 +86,7 @@ def test_eglible_for_update_is_not_annoying_when_new_version_is_released with_eglible_environment(cmd: @cmd, rubygems_version: current_version, latest_rubygems_version: latest_version) do Time.stub :now, @start_time do refute @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + assert_equal @start_time, Gem.configuration.last_update_check end end @@ -100,7 +100,7 @@ def test_eglible_for_update_is_not_annoying_when_new_version_is_released ) do Time.stub :now, @start_time + @week do refute @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + @week + assert_equal @start_time + @week, Gem.configuration.last_update_check end end @@ -117,7 +117,7 @@ def test_eglible_for_update_is_not_annoying_when_new_version_is_released ) do Time.stub :now, @start_time + @week + @minute do refute @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + @week + assert_equal @start_time + @week, Gem.configuration.last_update_check end end end @@ -127,19 +127,19 @@ def test_eglible_for_update_is_not_annoying_when_not_upgraded # checking for first time, it is eglible and stored Time.stub :now, @start_time do assert @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + assert_equal @start_time, Gem.configuration.last_update_check end # checking minute later is not eglible and not stored Time.stub :now, @start_time + @minute do refute @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + assert_equal @start_time, Gem.configuration.last_update_check end # checking week later is eglible again and stored Time.stub :now, @start_time + @week do assert @cmd.eglible_for_update? - assert_equal Gem.configuration.last_update_check, @start_time + @week + assert_equal @start_time + @week, Gem.configuration.last_update_check end end end