Module: PublifyCore::TestingSupport::UploadFixtures
- Defined in:
- lib/publify_core/testing_support/upload_fixtures.rb
Class Method Summary collapse
-
.file_upload(file = "testfile.txt", mime_type = "text/plain") ⇒ Object
Provide file upload helper for all specs.
Class Method Details
.file_upload(file = "testfile.txt", mime_type = "text/plain") ⇒ Object
Provide file upload helper for all specs
9 10 11 12 |
# File 'lib/publify_core/testing_support/upload_fixtures.rb', line 9 def file_upload(file = "testfile.txt", mime_type = "text/plain") Rack::Test::UploadedFile.new(File.join(__dir__, "fixtures", file), mime_type) end |