Sha256: 99b6854d517204397b3429cf4ad9655c34d62a0bf6464b8a20ac46562815d3a9
Contents?: true
Size: 694 Bytes
Versions: 2
Compression:
Stored size: 694 Bytes
Contents
# https://til.codes/testing-carrierwave-file-uploads-with-rspec-and-factorygirl/ FactoryGirl.define do factory :pwb_prop_photo, class: 'Pwb::PropPhoto' do Rails.application.secrets.cloudinary_url = nil # Nov 2017 - getting this error: # ArgumentError: Missing `original_filename` for IO # from 2 lines below # path_to_file = Pwb::Engine.root.join("db/example_images/flat_balcony.jpg") # image Rack::Test::UploadedFile.new(File.open(path_to_file)) # seems to be to do with: # https://github.com/rack-test/rack-test/pull/209 # https://github.com/rack-test/rack-test/issues/207 # File.join(Rails.root, '/spec/fixtures/myfiles/myfile.jpg'))) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pwb-1.4.0 | spec/factories/pwb_prop_photos.rb |
pwb-1.3.0 | spec/factories/pwb_prop_photos.rb |