Sha256: 879bf08e9747a14d69f7cd1f8bed8ce2d33f1905555649d755defd9eb906cf51
Contents?: true
Size: 623 Bytes
Versions: 41
Compression:
Stored size: 623 Bytes
Contents
# encoding: utf-8 FactoryGirl.define do factory :asset_avatar, :class => Avatar do |a| #include ActionDispatch::TestProcess a.data File.open('spec/factories/files/rails.png') a.association :assetable, :factory => :default_user before(:create) do |instance| instance.data_content_type ||= "image/png" end end factory :asset_avatar_big, :class => Avatar do |a| a.data File.open('spec/factories/files/silicon_valley.jpg') a.association :assetable, :factory => :default_user before(:create) do |instance| instance.data_content_type ||= "image/jpg" end end end
Version data entries
41 entries across 41 versions & 1 rubygems
Version | Path |
---|---|
sunrise-cms-0.3.0.rc2 | spec/factories/asset_factory.rb |