diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/blob_test.rb | 5 | ||||
-rw-r--r-- | test/test_helper.rb | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/test/blob_test.rb b/test/blob_test.rb index 45f6b5e3ba..9d190fb703 100644 --- a/test/blob_test.rb +++ b/test/blob_test.rb @@ -21,12 +21,7 @@ class ActiveFile::BlobTest < ActiveSupport::TestCase end end - private - def create_blob(data: "Hello world!", filename: "hello.txt", content_type: "text/plain") - ActiveFile::Blob.create_after_upload! io: StringIO.new(data), filename: filename, content_type: content_type - end - def expected_url_for(blob, disposition: :inline) "/rails/blobs/#{ActiveFile::VerifiedKeyWithExpiration.encode(blob.key, expires_in: 5.minutes)}?disposition=#{disposition}" end diff --git a/test/test_helper.rb b/test/test_helper.rb index 1f947fce90..9bb4a2fca1 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,6 @@ require "bundler/setup" require "active_support" +require "active_support/test_case" require "active_support/testing/autorun" require "byebug" @@ -10,3 +11,10 @@ ActiveFile::Blob.site = ActiveFile::Site.configure(:Disk, root: File.join(Dir.tm require "active_file/verified_key_with_expiration" ActiveFile::VerifiedKeyWithExpiration.verifier = ActiveSupport::MessageVerifier.new("Testing") + +class ActiveSupport::TestCase + private + def create_blob(data: "Hello world!", filename: "hello.txt", content_type: "text/plain") + ActiveFile::Blob.create_after_upload! io: StringIO.new(data), filename: filename, content_type: content_type + end +end
\ No newline at end of file |