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

Version Path
pwb-1.2.0 spec/factories/pwb_prop_photos.rb
pwb-1.1.1 spec/factories/pwb_prop_photos.rb
pwb-1.0.0 spec/factories/pwb_prop_photos.rb
pwb-0.1.1 spec/factories/pwb_prop_photos.rb
pwb-0.1.0 spec/factories/pwb_prop_photos.rb