summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_update_suggestion.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-21 17:17:19 +0900
committergit <svn-admin@ruby-lang.org>2023-06-22 09:44:40 +0000
commit67ab8b4346f69d80ef6563b6269355adc41c472c (patch)
tree14d6ec6e65fa7d22a955bdf82d6bffcfa6dc199d /test/rubygems/test_gem_update_suggestion.rb
parentddb431c96036a46afd5ef24ab2dde4743a11a4f8 (diff)
[rubygems/rubygems] Fix argument order of `assert_equal`
https://github.com/rubygems/rubygems/commit/a7c015f82b
Diffstat (limited to 'test/rubygems/test_gem_update_suggestion.rb')
-rw-r--r--test/rubygems/test_gem_update_suggestion.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/rubygems/test_gem_update_suggestion.rb b/test/rubygems/test_gem_update_suggestion.rb
index f74349fe24..835a2d84f1 100644
--- a/test/rubygems/test_gem_update_suggestion.rb
+++ b/test/rubygems/test_gem_update_suggestion.rb
@@ -69,7 +69,7 @@ class TestUpdateSuggestion < Gem::TestCase
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 @@ class TestUpdateSuggestion < Gem::TestCase
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 @@ class TestUpdateSuggestion < Gem::TestCase
) 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 @@ class TestUpdateSuggestion < Gem::TestCase
) 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 @@ class TestUpdateSuggestion < Gem::TestCase
# 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