public
Created — forked from robertomiranda/factories.rb

Simulate Paperclip Attachments With FactoryGirl

  • Download Gist
factories.rb
Ruby
1 2 3 4 5 6 7
Factory.define :item do |f|
include ActionDispatch::TestProcess
 
f.name "Macbook Pro 15"
f.price_in_dollars 1500
f.photo Rack::Test::UploadedFile.new(File.join(Rails.root, 'spec', 'support', 'rails.png'), 'image/png')
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.