diff --git a/Library/Homebrew/test/download_strategies/abstract_spec.rb b/Library/Homebrew/test/download_strategies/abstract_spec.rb index e58b15b49f..c56451daed 100644 --- a/Library/Homebrew/test/download_strategies/abstract_spec.rb +++ b/Library/Homebrew/test/download_strategies/abstract_spec.rb @@ -12,7 +12,7 @@ RSpec.describe AbstractDownloadStrategy do let(:args) { %w[foo bar baz] } specify "#source_modified_time" do - Mktemp.new("mtime") do + mktmpdir("mtime").cd do FileUtils.touch "foo", mtime: Time.now - 10 FileUtils.touch "bar", mtime: Time.now - 100 FileUtils.ln_s "not-exist", "baz"