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-1.0.6 spec/factories/asset_factory.rb
sunrise-cms-1.0.5 spec/factories/asset_factory.rb
sunrise-cms-1.0.4 spec/factories/asset_factory.rb
sunrise-cms-1.0.3 spec/factories/asset_factory.rb
sunrise-cms-1.0.2 spec/factories/asset_factory.rb
sunrise-cms-1.0.1 spec/factories/asset_factory.rb
sunrise-cms-1.0.0 spec/factories/asset_factory.rb
sunrise-cms-1.0.0.rc3 spec/factories/asset_factory.rb
sunrise-cms-1.0.0.rc2 spec/factories/asset_factory.rb
sunrise-cms-1.0.0.rc1 spec/factories/asset_factory.rb
sunrise-cms-0.7.0.rc2 spec/factories/asset_factory.rb
sunrise-cms-0.7.0.rc1 spec/factories/asset_factory.rb
sunrise-cms-0.6.11 spec/factories/asset_factory.rb
sunrise-cms-0.6.10 spec/factories/asset_factory.rb
sunrise-cms-0.6.9 spec/factories/asset_factory.rb
sunrise-cms-0.6.8 spec/factories/asset_factory.rb
sunrise-cms-0.6.7 spec/factories/asset_factory.rb
sunrise-cms-0.6.6 spec/factories/asset_factory.rb
sunrise-cms-0.6.5 spec/factories/asset_factory.rb
sunrise-cms-0.6.4 spec/factories/asset_factory.rb