OSDN Git Service

fix test
[pettanr/pettanr.git] / spec / manifests / home_spec.rb
1 # -*- encoding: utf-8 -*-
2 require 'spec_helper'
3 # フォルダ
4
5 describe HomeController do
6   include ManifestsMacros
7   before do
8     @model = Folder
9   end
10   
11   describe 'コントローラに於いて' do
12     before do
13       @controller = Manifest.manifest.controllers['home']
14     end
15     describe 'actionに於いて' do
16       before do
17         @actions = @controller.actions
18         @actions_names = ['scrolls', 'scroll_panels', 'comics', 'stories', 
19         'story_sheets', 'sheets', 'sheet_panels', 'panels', 
20         'panel_pictures', 'speech_balloons', 'speeches', 'balloons', 
21         'ground_pictures', 'ground_colors', 'original_pictures', 'resource_pictures']
22       end
23       it 'これらのアクションが定義されている' do
24         set_actions? @actions, @actions_names
25       end
26       describe 'baseに於いて' do
27       end
28       describe 'scrollsに於いて' do
29         before do
30           @action = @actions['scrolls']
31         end
32         it 'listタイプのアクションである' do
33           expect(@action.type).to eq 'list'
34         end
35         it 'マニフェストから設定を取り出している' do
36           # 自分が投稿したアイテムのリストを返すように定義している
37           set_list_action? @action, 'scroll', 'private'
38         end
39       end
40       describe 'scroll_panelsに於いて' do
41         before do
42           @action = @actions['scroll_panels']
43         end
44         it 'listタイプのアクションである' do
45           expect(@action.type).to eq 'list'
46         end
47         it 'マニフェストから設定を取り出している' do
48           # 自分が投稿したアイテムのリストを返すように定義している
49           set_list_action? @action, 'scroll_panel', 'private'
50         end
51       end
52       describe 'comicsに於いて' do
53         before do
54           @action = @actions['comics']
55         end
56         it 'listタイプのアクションである' do
57           expect(@action.type).to eq 'list'
58         end
59         it 'マニフェストから設定を取り出している' do
60           # 自分が投稿したアイテムのリストを返すように定義している
61           set_list_action? @action, 'comic', 'private'
62         end
63       end
64       describe 'storiesに於いて' do
65         before do
66           @action = @actions['stories']
67         end
68         it 'listタイプのアクションである' do
69           expect(@action.type).to eq 'list'
70         end
71         it 'マニフェストから設定を取り出している' do
72           # 自分が投稿したアイテムのリストを返すように定義している
73           set_list_action? @action, 'story', 'private'
74         end
75       end
76       describe 'story_sheetsに於いて' do
77         before do
78           @action = @actions['story_sheets']
79         end
80         it 'listタイプのアクションである' do
81           expect(@action.type).to eq 'list'
82         end
83         it 'マニフェストから設定を取り出している' do
84           # 自分が投稿したアイテムのリストを返すように定義している
85           set_list_action? @action, 'story_sheet', 'private'
86         end
87       end
88       describe 'sheetsに於いて' do
89         before do
90           @action = @actions['sheets']
91         end
92         it 'listタイプのアクションである' do
93           expect(@action.type).to eq 'list'
94         end
95         it 'マニフェストから設定を取り出している' do
96           # 自分が投稿したアイテムのリストを返すように定義している
97           set_list_action? @action, 'sheet', 'private'
98         end
99       end
100       describe 'sheet_panelsに於いて' do
101         before do
102           @action = @actions['sheet_panels']
103         end
104         it 'listタイプのアクションである' do
105           expect(@action.type).to eq 'list'
106         end
107         it 'マニフェストから設定を取り出している' do
108           # 自分が投稿したアイテムのリストを返すように定義している
109           set_list_action? @action, 'sheet_panel', 'private'
110         end
111       end
112       describe 'panelsに於いて' do
113         before do
114           @action = @actions['panels']
115         end
116         it 'listタイプのアクションである' do
117           expect(@action.type).to eq 'list'
118         end
119         it 'マニフェストから設定を取り出している' do
120           # 自分が投稿したアイテムのリストを返すように定義している
121           set_list_action? @action, 'panel', 'private'
122         end
123       end
124       describe 'panel_picturesに於いて' do
125         before do
126           @action = @actions['panel_pictures']
127         end
128         it 'listタイプのアクションである' do
129           expect(@action.type).to eq 'list'
130         end
131         it 'マニフェストから設定を取り出している' do
132           # 自分が投稿したアイテムのリストを返すように定義している
133           set_list_action? @action, 'panel_picture', 'private'
134         end
135       end
136       describe 'speech_balloonsに於いて' do
137         before do
138           @action = @actions['speech_balloons']
139         end
140         it 'listタイプのアクションである' do
141           expect(@action.type).to eq 'list'
142         end
143         it 'マニフェストから設定を取り出している' do
144           # 自分が投稿したアイテムのリストを返すように定義している
145           set_list_action? @action, 'speech_balloon', 'private'
146         end
147       end
148       describe 'speechesに於いて' do
149         before do
150           @action = @actions['speeches']
151         end
152         it 'listタイプのアクションである' do
153           expect(@action.type).to eq 'list'
154         end
155         it 'マニフェストから設定を取り出している' do
156           # 自分が投稿したアイテムのリストを返すように定義している
157           set_list_action? @action, 'speech', 'private'
158         end
159       end
160       describe 'balloonsに於いて' do
161         before do
162           @action = @actions['balloons']
163         end
164         it 'listタイプのアクションである' do
165           expect(@action.type).to eq 'list'
166         end
167         it 'マニフェストから設定を取り出している' do
168           # 自分が投稿したアイテムのリストを返すように定義している
169           set_list_action? @action, 'balloon', 'private'
170         end
171       end
172       describe 'ground_picturesに於いて' do
173         before do
174           @action = @actions['ground_pictures']
175         end
176         it 'listタイプのアクションである' do
177           expect(@action.type).to eq 'list'
178         end
179         it 'マニフェストから設定を取り出している' do
180           # 自分が投稿したアイテムのリストを返すように定義している
181           set_list_action? @action, 'ground_picture', 'private'
182         end
183       end
184       describe 'ground_colorsに於いて' do
185         before do
186           @action = @actions['ground_colors']
187         end
188         it 'listタイプのアクションである' do
189           expect(@action.type).to eq 'list'
190         end
191         it 'マニフェストから設定を取り出している' do
192           # 自分が投稿したアイテムのリストを返すように定義している
193           set_list_action? @action, 'ground_color', 'private'
194         end
195       end
196       describe 'original_picturesに於いて' do
197         before do
198           @action = @actions['original_pictures']
199         end
200         it 'listタイプのアクションである' do
201           expect(@action.type).to eq 'list'
202         end
203         it 'マニフェストから設定を取り出している' do
204           # 自分が投稿したアイテムのリストを返すように定義している
205           set_list_action? @action, 'original_picture', 'private'
206         end
207       end
208       describe 'resource_picturesに於いて' do
209         before do
210           @action = @actions['resource_pictures']
211         end
212         it 'listタイプのアクションである' do
213           expect(@action.type).to eq 'list'
214         end
215         it 'マニフェストから設定を取り出している' do
216           # 自分が投稿したアイテムのリストを返すように定義している
217           set_list_action? @action, 'resource_picture', 'private'
218         end
219       end
220     end
221     
222   end
223   
224 end