Sha256: aebd6035468e463ea640985937df4f45ca700d39603950559e0069a6c61725a0
Contents?: true
Size: 478 Bytes
Versions: 2
Compression:
Stored size: 478 Bytes
Contents
module Utensils module UploadMacros include ActionDispatch::TestProcess def fixture_file_upload(filename = nil) super fixture_file_path(filename) end def fixture_file(filename = nil) File.new fixture_file_path(filename) end def fixture_file_path(filename = nil) filename ||= "photo.jpg" Rails.root.join('spec', 'fixtures', filename) end end end RSpec.configure do |config| config.include(Utensils::UploadMacros) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
utensils-4.0.0 | lib/utensils/upload_macros.rb |
utensils-3.0.0 | lib/utensils/upload_macros.rb |