Sha256: 6563b23122b048902f0ed3fd8d3be059a3946c16b2ef57d07578d9005ec4b14e

Contents?: true

Size: 794 Bytes

Versions: 19

Compression:

Stored size: 794 Bytes

Contents

FactoryGirl.define do
  factory :page, class: Redditor::Page do

    factory :full_page do
      after(:create) do |page|
        create(:slider, page: page, position: 1)
        create(:text, page: page, position: 2)
        create(:video, page: page, position: 3)
      end
    end

    factory :slider_page do
      after(:create) do |page|
        create(:slider, page: page, position: 1)
      end
    end

    factory :video_page do
      after(:create) do |page|
        create(:video, page: page, position: 1)
      end
    end

    factory :text_page do
      after(:create) do |page|
        create(:text, page: page, position: 1)
      end
    end

    factory :image_page do
      after(:create) do |page|
        create(:image, page: page, position: 1)
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
redditor-0.1.22 spec/factories/redditor/pages_factory.rb
redditor-0.1.20 spec/factories/redditor/pages_factory.rb
redditor-0.1.17 spec/factories/redditor/pages_factory.rb
redditor-0.1.16 spec/factories/redditor/pages_factory.rb
redditor-0.1.15 spec/factories/redditor/pages_factory.rb
redditor-0.1.14 spec/factories/redditor/pages_factory.rb
redditor-0.1.12 spec/factories/redditor/pages_factory.rb
redditor-0.1.11 spec/factories/redditor/pages_factory.rb
redditor-0.1.10 spec/factories/redditor/pages_factory.rb
redditor-0.1.9 spec/factories/redditor/pages_factory.rb
redditor-0.1.8 spec/factories/redditor/pages_factory.rb
redditor-0.1.7 spec/factories/redditor/pages_factory.rb
redditor-0.1.6 spec/factories/redditor/pages_factory.rb
redditor-0.1.5 spec/factories/redditor/pages_factory.rb
redditor-0.1.4 spec/factories/redditor/pages_factory.rb
redditor-0.1.3 spec/factories/redditor/pages_factory.rb
redditor-0.1.2 spec/factories/redditor/pages_factory.rb
redditor-0.1.1 spec/factories/redditor/pages_factory.rb
redditor-0.1.0 spec/factories/redditor/pages_factory.rb