Created — forked from robertomiranda/factories.rb

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Simulate Paperclip Attachments With FactoryGirl

View factories.rb
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
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.