mirror of https://github.com/rails/rails
Fix: FileStoreTest#test_filename_max_size fails in Ruby 2.5.1
This commit is contained in:
parent
f4680e4923
commit
0548d655f2
|
@ -68,7 +68,9 @@ class FileStoreTest < ActiveSupport::TestCase
|
|||
def test_filename_max_size
|
||||
key = "#{'A' * ActiveSupport::Cache::FileStore::FILENAME_MAX_SIZE}"
|
||||
path = @cache.send(:normalize_key, key, {})
|
||||
Dir::Tmpname.create(path) do |tmpname, n, opts|
|
||||
basename = File.basename(path)
|
||||
dirname = File.dirname(path)
|
||||
Dir::Tmpname.create(basename, Dir.tmpdir + dirname) do |tmpname, n, opts|
|
||||
assert File.basename(tmpname + ".lock").length <= 255, "Temp filename too long: #{File.basename(tmpname + '.lock').length}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue