Sha256: 315839eca29f151d5d04bd7fb9902fe700ef153a7bc4f20f193cf03bdba4f4d1
Contents?: true
Size: 1.03 KB
Versions: 4
Compression:
Stored size: 1.03 KB
Contents
FactoryGirl.define do sequence(:title) { |n| "English Title #{n}" } factory :page, class: 'Qbrick::Page' do |p| p.parent nil p.position 1 p.title { FactoryGirl.generate(:title) } p.published 1 p.body 'lorem ipsum' p.url '' end factory :text_brick, class: 'Qbrick::TextBrick' do |tb| tb.type 'Qbrick::TextBrick' tb.text 'DummyText' end factory :placeholder_brick, class: 'Qbrick::PlaceholderBrick' do |tb| tb.type 'Qbrick::PlaceholderBrick' tb.template_name 'foo' end factory :image_brick, class: 'Qbrick::ImageBrick' do |ib| ib.image File.open("#{Qbrick::Engine.root}/spec/dummy/app/assets/images/spec-image.png") ib.image_size 'gallery' end factory :asset, class: Qbrick::Asset do |a| a.file File.open("#{Qbrick::Engine.root}/spec/dummy/app/assets/images/spec-image.png") end factory :setting, class: Qbrick::Setting do |s| s.key 'code' s.value 'SomeValue' end factory :admin, class: Qbrick::Admin do email 'test@test.com' password 'somel33tPW' end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
qbrick-2.6.0 | spec/factories.rb |
qbrick-2.5.2 | spec/factories.rb |
qbrick-2.5.1 | spec/factories.rb |
qbrick-2.5.0 | spec/factories.rb |