OSDN Git Service

fix spec
[pettanr/pettanr.git] / spec / peta / element_spec.rb
1 # -*- encoding: utf-8 -*-
2 require 'spec_helper'
3 #スクロール
4
5 describe Scroll do
6   include ElementMacros
7   before do
8     @admin =FactoryGirl.create :admin
9     @user_yas = FactoryGirl.create :user_yas_with_owner
10     @user_rom = FactoryGirl.create :user_rom
11     @author_yas =  @user_yas.author
12   end
13   
14   describe '生成メソッドに於いて' do
15     before do
16       @item =  FactoryGirl.create :scroll_hello_with_scroll_panels, author: @author_yas
17     end
18     
19     describe 'leaf_itemsに於いて' do
20       it 'ぶら下がるそれぞれのリーフを取得できる' do
21         define_leaf_items? @item, [ScrollPanel]
22       end
23     end
24     
25     describe 'leafs_itemsに於いて' do
26       it 'すべてのリーフを取得できる' do
27         define_leafs_items? @item, [ScrollPanel]
28       end
29     end
30     
31   end
32   
33 end
34
35 describe SheetPanel do
36   include ElementMacros
37   before do
38     @admin =FactoryGirl.create :admin
39     @user_yas = FactoryGirl.create :user_yas_with_owner
40     @user_rom = FactoryGirl.create :user_rom
41     @author_yas =  @user_yas.author
42   end
43   
44 end
45
46 describe PanelPicture do
47   include ElementMacros
48   before do
49     @admin =FactoryGirl.create :admin
50     @user_yas = FactoryGirl.create :user_yas_with_owner
51     @user_rom = FactoryGirl.create :user_rom
52     @author_yas =  @user_yas.author
53   end
54   
55 end
56
57 describe SpeechBalloon do
58   include ElementMacros
59   before do
60     @admin =FactoryGirl.create :admin
61     @user_yas = FactoryGirl.create :user_yas_with_owner
62     @user_rom = FactoryGirl.create :user_rom
63     @author_yas =  @user_yas.author
64   end
65   
66 end
67
68 describe Balloon do
69   include ElementMacros
70   before do
71     @admin =FactoryGirl.create :admin
72     @user_yas = FactoryGirl.create :user_yas_with_owner
73     @user_rom = FactoryGirl.create :user_rom
74     @author_yas =  @user_yas.author
75   end
76   
77 end
78
79 describe Speech do
80   include ElementMacros
81   before do
82     @admin =FactoryGirl.create :admin
83     @user_yas = FactoryGirl.create :user_yas_with_owner
84     @user_rom = FactoryGirl.create :user_rom
85     @author_yas =  @user_yas.author
86   end
87   
88 end
89
90 describe GroundPicture do
91   include ElementMacros
92   before do
93     @admin =FactoryGirl.create :admin
94     @user_yas = FactoryGirl.create :user_yas_with_owner
95     @user_rom = FactoryGirl.create :user_rom
96     @author_yas =  @user_yas.author
97   end
98   
99 end
100
101 describe GroundColor do
102   include ElementMacros
103   before do
104     @admin =FactoryGirl.create :admin
105     @user_yas = FactoryGirl.create :user_yas_with_owner
106     @user_rom = FactoryGirl.create :user_rom
107     @author_yas =  @user_yas.author
108   end
109   
110 end