Sha256: 080e93ce7c05d18588d69550120c9b61924f7e1ff723b53e7d2540e28c470e6b

Contents?: true

Size: 352 Bytes

Versions: 4

Compression:

Stored size: 352 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 fixture_file_upload("#{::Rails.root}/spec/fixtures/rails.png", "image/png")
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
uploader-3.1.4 test/rails_test/spec/factories.rb
uploader-3.1.3 test/rails_test/spec/factories.rb
uploader-3.1.2 test/rails_test/spec/factories.rb
uploader-3.1.1 test/rails_test/spec/factories.rb