mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Fix methods removed in Ruby 3.2 (#15459)
* File.exists? is deprecated and removed in Ruby 3.2 in favor of File.exist? * Dir.exists? is deprecated and removed in Ruby 3.2 in favor of Dir.exist?
This commit is contained in:
@ -13,8 +13,8 @@ class Autospec::Formatter < RSpec::Core::Formatters::BaseTextFormatter
|
||||
|
||||
def initialize(output)
|
||||
super
|
||||
FileUtils.mkdir_p("tmp") unless Dir.exists?("tmp")
|
||||
File.delete(RSPEC_RESULT) if File.exists?(RSPEC_RESULT)
|
||||
FileUtils.mkdir_p("tmp") unless Dir.exist?("tmp")
|
||||
File.delete(RSPEC_RESULT) if File.exist?(RSPEC_RESULT)
|
||||
@fail_file = File.open(RSPEC_RESULT, "w")
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user