Sha256: 9af76575fac96040ad4eafc62af9bfa96a49c83c38965da24eca2df001e7a36d

Contents?: true

Size: 308 Bytes

Versions: 4

Compression:

Stored size: 308 Bytes

Contents

FactoryGirl.define do
  factory :ecm_sliders_slider, :class => Ecm::Sliders::Slider do
    sequence(:name) { |i| "Slider ##{i}" }

    factory :ecm_sliders_slider_with_items do |slider|
      slider.after_create { |s| FactoryGirl.create_list(:ecm_sliders_item, 5, ecm_sliders_slider: s) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ecm_sliders2-0.0.4 spec/factories/ecm/sliders/sliders.rb
ecm_sliders2-0.0.3 spec/factories/ecm/sliders/sliders.rb
ecm_sliders2-0.0.2 spec/factories/ecm/sliders/sliders.rb
ecm_sliders2-0.0.1 spec/factories/ecm/sliders/sliders.rb