Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Simulate Paperclip Attachments With FactoryGirl
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.