1 # -*- encoding: utf-8 -*-
\r
2 FactoryGirl.define do
\r
3 factory :scroll_hello, :class => Scroll do |i|
\r
7 #association :author, factory: :author_yas
\r
8 trait :with_scroll_panels do
\r
9 after(:create) do |scroll, evaluator|
\r
10 #panel_hello = create(:panel_hello, author: scroll.author)
\r
11 create(:scroll_panel_plain, t: 0, scroll: scroll, panel: create(:panel_hello, author: scroll.author))
\r
12 panel_my_name = create(:panel_hello, author: scroll.author)
\r
13 create(:scroll_panel_plain, t: 1, scroll: scroll, panel: panel_my_name)
\r
14 panel_penjiro = create(:panel_hello, author: scroll.author)
\r
15 create(:scroll_panel_plain, t: 2, scroll: scroll, panel: panel_penjiro)
\r
16 panel_enjoy = create(:panel_hello, author: scroll.author)
\r
17 create(:scroll_panel_plain, t: 3, scroll: scroll, panel: panel_enjoy)
\r
20 factory :scroll_hello_with_scroll_panels, traits: [:with_scroll_panels]
\r
22 factory :scroll_hidden, :class => Scroll do |i|
\r
24 i.description '非公開の状態で作成したり、公開スクロールを非公開に変えるときに使う。'
\r
27 factory :scroll003, :class => Scroll do |i|
\r
33 factory :scroll004, :class => Scroll do |i|
\r
39 factory :scroll005, :class => Scroll do |i|
\r
45 factory :scroll006, :class => Scroll do |i|
\r
51 factory :scroll007, :class => Scroll do |i|
\r
52 i.title '「はてなブックマーク」が、重すぎる'
\r
53 i.description 'zzzz'
\r
57 factory :scroll008, :class => Scroll do |i|
\r