@@ -27,7 +27,7 @@ def self.with_eglible_environment(
2727 original_config , Gem . configuration [ :prevent_update_suggestion ] = Gem . configuration [ :prevent_update_suggestion ] , nil
2828 original_env , ENV [ "RUBYGEMS_PREVENT_UPDATE_SUGGESTION" ] = ENV [ "RUBYGEMS_PREVENT_UPDATE_SUGGESTION" ] , nil
2929 original_disable , Gem . disable_system_update_message = Gem . disable_system_update_message , nil
30- Gem . configuration [ : last_update_check] = nil
30+ Gem . configuration . last_update_check = 0
3131
3232 Gem . ui . stub :tty? , tty do
3333 Gem . stub :rubygems_version , rubygems_version do
@@ -61,10 +61,10 @@ def test_eglible_for_update
6161 with_eglible_environment ( cmd : @cmd ) do
6262 Time . stub :now , 123456789 do
6363 assert @cmd . eglible_for_update?
64- assert_equal Gem . configuration [ : last_update_check] , 123456789
64+ assert_equal Gem . configuration . last_update_check , 123456789
6565
6666 # test last check is written to config file
67- assert File . read ( Gem . configuration . config_file_name ) . match ( "last_update_check: 123456789" )
67+ assert File . read ( Gem . configuration . state_file_name ) . match ( "123456789" )
6868 end
6969 end
7070 end
@@ -122,15 +122,15 @@ def test_eglible_for_update_on_ci
122122
123123 def test_eglible_for_update_unwrittable_config
124124 with_eglible_environment ( ci : true , cmd : @cmd ) do
125- Gem . configuration . stub :config_file_writable ? , false do
125+ Gem . configuration . stub :state_file_writable ? , false do
126126 refute @cmd . eglible_for_update?
127127 end
128128 end
129129 end
130130
131131 def test_eglible_for_update_notification_delay
132132 with_eglible_environment ( cmd : @cmd ) do
133- Gem . configuration [ : last_update_check] = Time . now . to_i
133+ Gem . configuration . last_update_check = Time . now . to_i
134134 refute @cmd . eglible_for_update?
135135 end
136136 end
0 commit comments