OSDN Git Service

fix peta test
[pettanr/pettanr.git] / spec / factories / sheet.rb
1 # -*- encoding: utf-8 -*-\r
2 FactoryGirl.define do\r
3   factory :sheet_install_a, :class => Sheet do |i|\r
4     i.caption 'ダウンロード方法'\r
5     i.width 839\r
6     i.height 1191\r
7     i.visible 1\r
8     trait :with_sheet_panels do\r
9       after(:create) do |sheet, evaluator|\r
10         create(:sheet_panel_plain, z: 1, t: 0, sheet: sheet, panel: create(:panel_install_install, author: sheet.author))\r
11         create(:sheet_panel_plain, z: 2, t: 1, sheet: sheet, panel: create(:panel_install_install, author: sheet.author))\r
12       end\r
13     end\r
14     factory :sheet_install_a_with_sheet_panels, traits: [:with_sheet_panels]\r
15   end\r
16   factory :sheet_install_b, :class => Sheet do |i|\r
17     i.caption '展開してインストール'\r
18     i.width 839\r
19     i.height 1191\r
20     i.visible 1\r
21   end\r
22   factory :sheet_setup_a, :class => Sheet do |i|\r
23     i.caption '設定ファイルの編集'\r
24     i.width 839\r
25     i.height 1191\r
26     i.visible 1\r
27   end\r
28   factory :sheet_setup_b, :class => Sheet do |i|\r
29     i.caption '管理者アカウントの作成'\r
30     i.width 839\r
31     i.height 1191\r
32     i.visible 1\r
33   end\r
34   factory :sheet, :class => Sheet do |i|\r
35     i.caption 'test'\r
36     i.width 839\r
37     i.height 1191\r
38     i.visible 1\r
39   end\r
40   factory :sheet006, :class => Sheet do |i|\r
41     i.caption '社会でうまくいかず'\r
42     i.width 839\r
43     i.height 1191\r
44     i.visible 1\r
45     i.author_id 1\r
46   end\r
47   factory :sheet007, :class => Sheet do |i|\r
48     i.caption '友人と起業'\r
49     i.width 839\r
50     i.height 1191\r
51     i.visible 0\r
52     i.author_id 1\r
53   end\r
54 end\r