1 # -*- encoding: utf-8 -*-
\r
2 FactoryGirl.define do
\r
3 factory :scroll_hello, :class => Scroll do |i|
\r
5 i.description 'とうとうあいつが目覚めたぞ。その勇姿をご覧あれ。'
\r
7 #association :author, factory: :author_yas
\r
8 trait :with_scroll_panels do
\r
9 after(:create) do |scroll, evaluator|
\r
10 create(:scroll_panel_plain, t: 0, scroll: scroll, panel: create(:panel_hello, author: scroll.author))
\r
11 create(:scroll_panel_plain, t: 1, scroll: scroll, panel: create(:panel_my_name, author: scroll.author))
\r
12 create(:scroll_panel_plain, t: 2, scroll: scroll, panel: create(:panel_penjiro, author: scroll.author))
\r
13 create(:scroll_panel_plain, t: 3, scroll: scroll, panel: create(:panel_enjoy, author: scroll.author))
\r
16 factory :scroll_hello_with_scroll_panels, traits: [:with_scroll_panels]
\r
18 factory :scroll_hidden, :class => Scroll do |i|
\r
20 i.description '非公開の状態で作成したり、公開スクロールを非公開に変えるときに使う。'
\r
23 factory :scroll_itojun, :class => Scroll do |i|
\r
28 factory :scroll_great, :class => Scroll do |i|
\r
32 trait :with_scroll_panels do
\r
33 after(:create) do |scroll, evaluator|
\r
34 create(:scroll_panel_plain, t: 0, scroll: scroll, panel: create(:panel_great, author: scroll.author))
\r
35 create(:scroll_panel_plain, t: 1, scroll: scroll, panel: create(:panel_awesome, author: scroll.author))
\r
36 create(:scroll_panel_plain, t: 2, scroll: scroll, panel: create(:panel_wonderful, author: scroll.author))
\r
39 factory :scroll_great_with_scroll_panels, traits: [:with_scroll_panels]
\r
41 factory :scroll_diary, :class => Scroll do |i|
\r
46 factory :scroll006, :class => Scroll do |i|
\r
52 factory :scroll007, :class => Scroll do |i|
\r
53 i.title '「はてなブックマーク」が、重すぎる'
\r
54 i.description 'zzzz'
\r
58 factory :scroll008, :class => Scroll do |i|
\r