diff --git a/Library/Homebrew/test/download_strategies/abstract_spec.rb b/Library/Homebrew/test/download_strategies/abstract_spec.rb index e58b15b49fd15..c56451daed7ed 100644 --- a/Library/Homebrew/test/download_strategies/abstract_spec.rb +++ b/Library/Homebrew/test/download_strategies/abstract_spec.rb @@ -12,7 +12,7 @@ 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"