Sha256: 5735f59af0eb2c5a2d4131b8ebd530de7b186f462c2f6dd7196d45c7ca5db7ca

Contents?: true

Size: 378 Bytes

Versions: 6

Compression:

Stored size: 378 Bytes

Contents

Factory.sequence :name do |n|
  "a_name#{n}"
end

Factory.define :user do |f|
  f.name { Factory.next(:name) }
end

Factory.define :upload do |f|
  f.creator {|a| a.association(:user)}
  f.uploadable {|a| a.association(:user)}
  f.caption { Factory.next(:name) }
  f.local ActionController::TestUploadedFile.new(File.join(RAILS_ROOT, 'public/images/rails.png'), 'image/png')
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uploader-2.0.2 test/rails_root/test/factories.rb
uploader-2.0.0 test/rails_root/test/factories.rb
uploader-1.0.3 test/rails_root/test/factories.rb
uploader-1.0.2 test/rails_root/test/factories.rb
uploader-1.0.1 test/rails_root/test/factories.rb
uploader-1.0.0 test/rails_root/test/factories.rb