Sha256: eba4151e4e216086aa4471e8ce8f1ac1b56a93543236b35155b972b97cb11498

Contents?: true

Size: 512 Bytes

Versions: 6

Compression:

Stored size: 512 Bytes

Contents

FactoryBot.define do
  factory :ecm_galleries_picture_detail, class: 'Ecm::Galleries::PictureDetail' do
    association :picture_gallery, factory: :ecm_galleries_picture_gallery
    after(:build) { |f|
      assets = f.picture_gallery.assets.attach(
        io:           File.open(File.join(Ecm::Galleries::Engine.root.join(*%w( spec files ecm galleries picture_details example.png)))),
        filename:     'example.png',
        content_type: 'image/png'
      )
      f.asset = assets.first
    }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ecm_galleries-0.5.0 spec/factories/ecm_galleries_picture_details.rb
ecm_galleries-0.4.1 spec/factories/ecm_galleries_picture_details.rb
ecm_galleries-0.4.0 spec/factories/ecm_galleries_picture_details.rb
ecm_galleries-0.2.0 spec/factories/ecm_galleries_picture_details.rb
ecm_galleries-0.1.0 spec/factories/ecm_galleries_picture_details.rb
ecm_galleries-0.0.8 spec/factories/ecm_galleries_picture_details.rb