Sha256: d3f1cf99bf22db0bd6b736bdf124d7ff9ab99c2e1098e2309ea636f40d2c0acb

Contents?: true

Size: 378 Bytes

Versions: 7

Compression:

Stored size: 378 Bytes

Contents

include ActionDispatch::TestProcess

FactoryGirl.define do
  # to_create do |instance|
  #   raise "Save failed for #{instance.class} (#{instance.errors.full_messages.inspect})" if !instance.save
  # end

  factory :polygallery_photo, :class => Polygallery::Photo do
    caption { [nil, MFaker::BaconIpsum.paragraph].sample }
    photo   { File.new get_random_photo }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
polygallery-0.3.6 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.5 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.4 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.3 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.2 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.1 lib/polygallery/factories/polygallery/photos.rb
polygallery-0.3.0 lib/polygallery/factories/polygallery/photos.rb