aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJeremy Daer <jeremydaer@gmail.com>2017-07-09 13:22:20 -0700
committerJeremy Daer <jeremydaer@gmail.com>2017-07-09 13:23:00 -0700
commitbb2d7fcbf58d621e1a607df01aab5ff232255a88 (patch)
tree7027118eb9c4c9068659b5207720844b1ec8fa5f /test/test_helper.rb
parent18720bc8fbf269184ac6f183a82ed045cc0c1965 (diff)
downloadrails-bb2d7fcbf58d621e1a607df01aab5ff232255a88.tar.gz
rails-bb2d7fcbf58d621e1a607df01aab5ff232255a88.tar.bz2
rails-bb2d7fcbf58d621e1a607df01aab5ff232255a88.zip
Tests: Dir.mktmpdir neatly wraps up tmpdir + join
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index ca1e0cad7e..03593b12c7 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -17,7 +17,8 @@ end
require "active_storage/service/disk_service"
-ActiveStorage::Blob.service = ActiveStorage::Service::DiskService.new(root: File.join(Dir.tmpdir, "active_storage"))
+require "tmpdir"
+ActiveStorage::Blob.service = ActiveStorage::Service::DiskService.new(root: Dir.mktmpdir("active_storage_tests"))
ActiveStorage::Service.logger = ActiveSupport::Logger.new(STDOUT)
require "active_storage/verified_key_with_expiration"
@@ -47,4 +48,4 @@ ActiveRecord::Base.send :extend, ActiveStorage::Attached::Macros
require "global_id"
GlobalID.app = "ActiveStorageExampleApp"
ActiveRecord::Base.send :include, GlobalID::Identification
-SignedGlobalID.verifier = ActiveStorage::VerifiedKeyWithExpiration.verifier \ No newline at end of file
+SignedGlobalID.verifier = ActiveStorage::VerifiedKeyWithExpiration.verifier