aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2017-11-09 22:09:00 +0900
committerGitHub <noreply@github.com>2017-11-09 22:09:00 +0900
commit2d5700b9a3e2ac25a5ff349ca6d3dc27077cea13 (patch)
tree24729ab9d05e58b264f5e1e0be27f44bf2616db1 /actionpack/test
parent4022f33416a00fd6a18989aa54f60573f48be0a0 (diff)
downloadrails-2d5700b9a3e2ac25a5ff349ca6d3dc27077cea13.tar.gz
rails-2d5700b9a3e2ac25a5ff349ca6d3dc27077cea13.tar.bz2
rails-2d5700b9a3e2ac25a5ff349ca6d3dc27077cea13.zip
Use `Dir.mktmpdir`
As `@cache_path` is expected to be a directory name, use `Dir.mktmpdir`. And omit unnecessary `Dir.tmpdir`.
Diffstat (limited to 'actionpack/test')
-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 4c59bea193..cb425fb3de 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 = Tempfile.create(%w"tmp cache", Dir.tmpdir)
+ @cache_path = Dir.mktmpdir(%w"tmp cache")
@controller.cache_store = :file_store, @cache_path
ActionController::LogSubscriber.attach_to :action_controller
end