aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2017-11-09 17:12:07 +0900
committerGitHub <noreply@github.com>2017-11-09 17:12:07 +0900
commit4022f33416a00fd6a18989aa54f60573f48be0a0 (patch)
treed5231f9febe7cdc22b9d4161251425f5697fbd07 /actionpack
parentbe6e1b8f7dbce1940f47339657faab2c1fdeaa54 (diff)
downloadrails-4022f33416a00fd6a18989aa54f60573f48be0a0.tar.gz
rails-4022f33416a00fd6a18989aa54f60573f48be0a0.tar.bz2
rails-4022f33416a00fd6a18989aa54f60573f48be0a0.zip
Use `Tempfile.create`
Instead of `Dir::Tmpname.make_tmpname`, an internal method which does not guarantee uniqueness, use `Tempfile.create`.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index f0f106c8ba..4c59bea193 100644
--- a/actionpack/test/controller/log_subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -98,7 +98,7 @@ class ACLogSubscriberTest < ActionController::TestCase
@old_logger = ActionController::Base.logger
- @cache_path = File.join Dir.tmpdir, Dir::Tmpname.make_tmpname("tmp", "cache")
+ @cache_path = Tempfile.create(%w"tmp cache", Dir.tmpdir)
@controller.cache_store = :file_store, @cache_path
ActionController::LogSubscriber.attach_to :action_controller
end