Sha256: 486af9c01989351218004e0d4647032494a06093e6a81f326b9bb86052b24e3a
Contents?: true
Size: 429 Bytes
Versions: 5
Compression:
Stored size: 429 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 path_to_file = Pwb::Engine.root.join("db/example_images/flat_balcony.jpg") image Rack::Test::UploadedFile.new(File.open(path_to_file)) # File.join(Rails.root, '/spec/fixtures/myfiles/myfile.jpg'))) end end
Version data entries
5 entries across 5 versions & 1 rubygems