OSDN Git Service

v07 first
[pettanr/pettanr.git] / spec / local_manifests / folder_spec.rb
1 # -*- encoding: utf-8 -*-
2 require 'spec_helper'
3 # フォルダ
4
5 describe Folder do
6   include LocalManifestsMacros
7   before do
8     @model = Folder
9   end
10   
11   describe 'ファイラーに於いて' do
12     before do
13       @my_local_manifest = LocalManifest.manifest.filers[@model.item_name]
14     end
15     it 'サポート機能が動作している' do
16       expect(@my_local_manifest.item_class).to eq @model
17       expect(@my_local_manifest.item_name).to eq @model.item_name
18       expect(@my_local_manifest.filer_name).to eq @model.item_name
19     end
20     describe 'symbolに於いて' do
21       before do
22         @symbol = @my_local_manifest.symbol
23       end
24       it 'defaultタイプのsymbolである' do
25         expect(@symbol.type).to eq 'default'
26       end
27       it 'サポート機能が動作している' do
28         expect(@symbol.visible?).to be true
29       end
30       describe 'faceに於いて' do
31         before do
32           @face = @symbol.face
33         end
34         it 'imageタイプのfaceである' do
35           expect(@face.type).to eq 'image'
36         end
37         it 'マニフェストから設定を取り出している' do
38           expect(@face.url).to eq '/images/folder.gif'
39         end
40       end
41       describe 'linkに於いて' do
42         before do
43           @link = @symbol.link
44         end
45         it 'actionタイプのlinkである' do
46           expect(@link.type).to eq 'action'
47         end
48         it 'マニフェストから設定を取り出している' do
49           expect(@link.action_name).to eq 'show'
50         end
51         it 'サポート機能が動作している' do
52           expect(@link.action_path).to eq '/folders/'
53         end
54       end
55     end
56     describe 'captionに於いて' do
57       before do
58         @caption = @my_local_manifest.caption
59       end
60       it 'defaultタイプのsymbolである' do
61         expect(@caption.type).to eq 'default'
62       end
63       it 'サポート機能が動作している' do
64         expect(@caption.visible?).to be true
65       end
66       describe 'faceに於いて' do
67         before do
68           @face = @caption.face
69         end
70         it 'columnタイプのfaceである' do
71           expect(@face.type).to eq 'method'
72         end
73         it 'マニフェストから設定を取り出している' do
74           expect(@face.method_name).to eq 'caption'
75         end
76       end
77       describe 'linkに於いて' do
78         before do
79           @link = @caption.link
80         end
81         it 'actionタイプのlinkである' do
82           expect(@link.type).to eq 'action'
83         end
84         it 'マニフェストから設定を取り出している' do
85           expect(@link.action_name).to eq 'show'
86         end
87         it 'サポート機能が動作している' do
88           expect(@link.action_path).to eq '/folders/'
89         end
90       end
91     end
92     describe 'summaryに於いて' do
93       before do
94         @summary = @my_local_manifest.summary
95       end
96       it 'templateタイプのsymbolである' do
97         expect(@summary.type).to eq 'template'
98       end
99       it 'マニフェストから設定を取り出している' do
100         expect(@summary.template_name).to eq 'summary'
101       end
102     end
103     describe 'iconに於いて' do
104       before do
105         @icon = @my_local_manifest.icon
106       end
107       it 'defaultタイプのsymbolである' do
108         expect(@icon.type).to eq 'default'
109       end
110       it 'サポート機能が動作している' do
111         expect(@icon.visible?).to be true
112       end
113     end
114     describe 'dateに於いて' do
115       before do
116         @date = @my_local_manifest.date
117       end
118       it 'defaultタイプのsymbolである' do
119         expect(@date.type).to eq 'default'
120       end
121       it 'サポート機能が動作している' do
122         expect(@date.visible?).to be true
123       end
124     end
125     describe 'editに於いて' do
126       before do
127         @edit = @my_local_manifest.edit
128       end
129       it 'defaultタイプのsymbolである' do
130         expect(@edit.type).to eq 'default'
131       end
132       it 'サポート機能が動作している' do
133         expect(@edit.visible?).to be true
134       end
135     end
136   end
137   
138   describe 'プロファイラーに於いて' do
139     before do
140       @my_local_manifest = LocalManifest.manifest.profilers[@model.item_name]
141     end
142     it 'マニフェストから設定を取り出している' do
143       expect(@my_local_manifest.item_name).to eq @model.item_name
144     end
145     describe 'columnsに於いて' do
146       before do
147         @columns = @my_local_manifest.columns
148         @names = ['id', 'name', 'controller_name', 'action_name', 'category_id',
149         't', 'parent_id', 'lft', 'rgt', 'depth', 'created_at', 'updated_at']
150       end
151       it 'これらのカラムが定義されている' do
152         set_columns? @columns, @names
153       end
154       describe 'nameに於いて' do
155         before do
156           @column = @columns['name']
157         end
158         it 'defaultタイプのcolumnである' do
159           expect(@column.type).to eq 'default'
160         end
161         it 'マニフェストから設定を取り出している' do
162           expect(@column.item_name).to eq 'folder'
163         end
164       end
165       describe 'controller_nameに於いて' do
166         before do
167           @column = @columns['controller_name']
168         end
169         it 'defaultタイプのcolumnである' do
170           expect(@column.type).to eq 'default'
171         end
172         it 'マニフェストから設定を取り出している' do
173           expect(@column.item_name).to eq 'folder'
174         end
175       end
176       describe 'action_nameに於いて' do
177         before do
178           @column = @columns['action_name']
179         end
180         it 'マニフェストから設定を取り出している' do
181           expect(@column.item_name).to eq 'folder'
182         end
183       end
184       describe 'category_idに於いて' do
185         before do
186           @column = @columns['category_id']
187         end
188         it 'defaultタイプのcolumnである' do
189           expect(@column.type).to eq 'default'
190         end
191         it 'マニフェストから設定を取り出している' do
192           expect(@column.item_name).to eq 'folder'
193         end
194       end
195       describe 'tに於いて' do
196         before do
197           @column = @columns['t']
198         end
199         it 'defaultタイプのcolumnである' do
200           expect(@column.type).to eq 'default'
201         end
202         it 'マニフェストから設定を取り出している' do
203           expect(@column.item_name).to eq 'folder'
204         end
205       end
206       describe 'parent_idに於いて' do
207         before do
208           @column = @columns['parent_id']
209         end
210         it 'defaultタイプのcolumnである' do
211           expect(@column.type).to eq 'default'
212         end
213         it 'マニフェストから設定を取り出している' do
214           expect(@column.item_name).to eq 'folder'
215         end
216       end
217       describe 'lftに於いて' do
218         before do
219           @column = @columns['lft']
220         end
221         it 'defaultタイプのcolumnである' do
222           expect(@column.type).to eq 'default'
223         end
224         it 'マニフェストから設定を取り出している' do
225           expect(@column.item_name).to eq 'folder'
226         end
227       end
228       describe 'rgtに於いて' do
229         before do
230           @column = @columns['rgt']
231         end
232         it 'defaultタイプのcolumnである' do
233           expect(@column.type).to eq 'default'
234         end
235         it 'マニフェストから設定を取り出している' do
236           expect(@column.item_name).to eq 'folder'
237         end
238       end
239       describe 'depthに於いて' do
240         before do
241           @column = @columns['depth']
242         end
243         it 'defaultタイプのcolumnである' do
244           expect(@column.type).to eq 'default'
245         end
246         it 'マニフェストから設定を取り出している' do
247           expect(@column.item_name).to eq 'folder'
248         end
249       end
250     end
251     describe 'column_namesに於いて' do
252       before do
253         @column_names = @my_local_manifest.column_names
254       end
255       it '数量が守られている' do
256         expect(@column_names.size).to eq 9 + 3
257       end
258       it '順序が守られている' do
259         expect(@column_names).to eq ['id', 'name', 'controller_name', 'action_name', 'category_id',
260         't', 'parent_id', 'lft', 'rgt', 'depth', 'created_at', 'updated_at']
261       end
262     end
263     describe 'extend_settingsに於いて' do
264       before do
265         @extend_settings = @my_local_manifest.extend_settings
266       end
267       it '拡張カラムは無い' do
268         expect(@extend_settings).to be_empty
269       end
270     end
271     describe 'listsに於いて' do
272       before do
273         @lists = @my_local_manifest.lists
274       end
275       it '無い' do
276         expect(@lists).to be_empty
277       end
278     end
279     describe 'associationsに於いて' do
280       before do
281         @associations = @my_local_manifest.associations
282       end
283       describe 'belongs_toに於いて' do
284         before do
285           @belongs_to = @associations.belongs_to
286         end
287         it 'これらの所属モデルを取り扱う' do
288           expect(@belongs_to.map {|a| a.name}).to eq []
289         end
290       end
291       describe 'has_manyに於いて' do
292         before do
293           @has_many = @associations.has_many
294         end
295         it 'これらの所持モデルを取り扱う' do
296           expect(@has_many.map {|a| a.table_name}).to eq []
297         end
298       end
299     end
300   end
301   
302   describe 'リストグループに於いて' do
303     before do
304       @my_local_manifest = LocalManifest.manifest.list_groups[@model.item_name]
305     end
306     it 'マニフェストから設定を取り出している' do
307       expect(@my_local_manifest.item_name).to eq @model.item_name
308     end
309     describe 'listsに於いて' do
310       before do
311         @lists = @my_local_manifest.lists
312       end
313       it 'これらのリストを定義している' do
314         set_lists? @lists, ['public']
315       end
316       describe 'publicに於いて' do
317         before do
318           @mani = @lists['public']
319         end
320         it 'マニフェストから設定を取り出している' do
321           expect(@mani.type).to eq 'public'
322         end
323         it 'マニフェストから設定を取り出している' do
324           expect(@mani.model).to eq Folder
325         end
326         it 'サポート機能が動作している' do
327           expect(@mani.has_id?).to be nil
328           expect(@mani.pre_id?).to be true
329           expect(@mani.item_name).to eq @model.item_name
330         end
331         describe 'whereに於いて' do
332           before do
333             @where = @mani.where
334           end
335           it 'autoタイプである' do
336             expect(@where.type).to eq 'auto'
337           end
338           it 'サポート機能が動作している' do
339             expect(@where.item_name).to eq @model.item_name
340             expect(@where.list_name).to eq 'public'
341             expect(@where.model).to eq Folder
342           end
343           it 'method_name' do
344             expect(@where.method_name).to eq 'list_where'
345           end
346         end
347         describe 'includesに於いて' do
348           before do
349             @includes = @mani.includes
350           end
351           it 'autoタイプである' do
352             expect(@includes.type).to eq 'auto'
353           end
354           it 'サポート機能が動作している' do
355             expect(@includes.item_name).to eq @model.item_name
356             expect(@includes.list_name).to eq 'public'
357             expect(@includes.model).to eq Folder
358           end
359           it 'includes' do
360             expect(@includes.includes).to be_empty
361           end
362         end
363         describe 'orderに於いて' do
364           before do
365             @order = @mani.order
366           end
367           it 'autoタイプである' do
368             expect(@order.type).to eq 'auto'
369           end
370           it 'サポート機能が動作している' do
371             expect(@order.item_name).to eq @model.item_name
372             expect(@order.list_name).to eq 'public'
373             expect(@order.model).to eq Folder
374           end
375           it 'order' do
376             expect(@order.order).to eq 'list_order'
377           end
378         end
379       end
380     end
381   end
382   
383   describe '入力フォームに於いて' do
384     before do
385       @my_local_manifest = LocalManifest.manifest.forms[@model.item_name]
386     end
387     it 'マニフェストから設定を取り出している' do
388       expect(@my_local_manifest.name).to eq @model.item_name
389     end
390     describe 'fieldsに於いて' do
391       before do
392         @fields = @my_local_manifest.fields
393       end
394       # 細かいチェックは後でやるので、大雑把に数量だけチェックしておく。
395       it '数量が守られている' do
396         expect(@fields.size).to eq 10
397       end
398     end
399     describe 'field_namesに於いて' do
400       before do
401         @field_names = @my_local_manifest.field_names
402       end
403       it '数量が守られている' do
404         expect(@field_names.size).to eq 10
405       end
406       it '順序が守られている' do
407         expect(@field_names).to eq ['name', 'controller_name', 'action_name', 'category_id',
408         't', 'parent_id', 'lft', 'rgt', 'depth', 'id']
409       end
410     end
411     # 処理順に並べられたフィールドのこと
412     # 本来fieldsでテストするべき内容だが、並び替えもテストしたいのでこちらで行う。
413     describe 'ordered_fieldsに於いて' do
414       before do
415         @ordered_fields = @my_local_manifest.ordered_fields
416         @names = ['name', 'controller_name', 'action_name', 'category_id',
417         't', 'parent_id', 'lft', 'rgt', 'depth', 'id']
418       end
419       it 'これらのフィールドを取り扱う' do
420         expect(@ordered_fields.map {|f| f.name }).to eq @names
421       end
422       describe 'nameに於いて' do
423         before do
424           @field = @ordered_fields[0]
425         end
426         it 'マニフェストから設定を取り出している' do
427           expect(@field.name).to eq 'name'
428           # default: true
429           expect(@field.row_break).to be true
430         end
431         it 'サポート機能が動作している' do
432           expect(@field.part?).to be false
433           expect(@field.form_name).to eq @model.item_name
434           expect(@field.column_name).to eq 'name'
435           expect(@field.model_name).to eq @model.item_name
436         end
437         describe 'labelに於いて' do
438           before do
439             @label = @field.label
440           end
441           it 'defaultタイプである' do
442             expect(@label.type).to eq 'default'
443           end
444           it 'マニフェストから設定を取り出している' do
445             # default: false
446             expect(@label.row_break).to be false
447           end
448           it 'サポート機能が動作している' do
449             expect(@label.form_name).to eq @model.item_name
450             expect(@label.field_name).to eq 'name'
451             expect(@label.model_name).to eq @model.item_name
452             expect(@label.column_name).to eq 'name'
453           end
454         end
455         describe 'tagに於いて' do
456           before do
457             @tag = @field.tag
458           end
459           it 'textタイプである' do
460             # text/number/text_area/select/hidden default: text
461             expect(@tag.type).to eq 'text'
462           end
463           it 'マニフェストから設定を取り出している' do
464             expect(@tag.options).to_not be_empty
465             expect(@tag.options['size']).to eq 20
466           end
467           it 'サポート機能が動作している' do
468             expect(@tag.form_name).to eq @model.item_name
469             expect(@tag.field_name).to eq 'name'
470           end
471         end
472       end
473       describe 'controller_nameに於いて' do
474         before do
475           @field = @ordered_fields[1]
476         end
477         it 'マニフェストから設定を取り出している' do
478           expect(@field.name).to eq 'controller_name'
479           # default: true
480           expect(@field.row_break).to be true
481         end
482         it 'サポート機能が動作している' do
483           expect(@field.part?).to be false
484           expect(@field.form_name).to eq @model.item_name
485           expect(@field.column_name).to eq 'controller_name'
486           expect(@field.model_name).to eq @model.item_name
487         end
488         describe 'labelに於いて' do
489           before do
490             @label = @field.label
491           end
492           it 'defaultタイプである' do
493             expect(@label.type).to eq 'default'
494           end
495           it 'マニフェストから設定を取り出している' do
496             # default: false
497             expect(@label.row_break).to be false
498           end
499           it 'サポート機能が動作している' do
500             expect(@label.form_name).to eq @model.item_name
501             expect(@label.field_name).to eq 'controller_name'
502             expect(@label.model_name).to eq @model.item_name
503             expect(@label.column_name).to eq 'controller_name'
504           end
505         end
506         describe 'tagに於いて' do
507           before do
508             @tag = @field.tag
509           end
510           it 'textタイプである' do
511             # text/number/text_area/select/hidden default: text
512             expect(@tag.type).to eq 'text'
513           end
514           it 'マニフェストから設定を取り出している' do
515             expect(@tag.options).to_not be_empty
516             expect(@tag.options['size']).to eq 20
517           end
518           it 'サポート機能が動作している' do
519             expect(@tag.form_name).to eq @model.item_name
520             expect(@tag.field_name).to eq 'controller_name'
521           end
522         end
523       end
524       describe 'action_nameに於いて' do
525         before do
526           @field = @ordered_fields[2]
527         end
528         it 'マニフェストから設定を取り出している' do
529           expect(@field.name).to eq 'action_name'
530           # default: true
531           expect(@field.row_break).to be true
532         end
533         it 'サポート機能が動作している' do
534           expect(@field.part?).to be false
535           expect(@field.form_name).to eq @model.item_name
536           expect(@field.column_name).to eq 'action_name'
537           expect(@field.model_name).to eq @model.item_name
538         end
539         describe 'labelに於いて' do
540           before do
541             @label = @field.label
542           end
543           it 'defaultタイプである' do
544             expect(@label.type).to eq 'default'
545           end
546           it 'マニフェストから設定を取り出している' do
547             # default: false
548             expect(@label.row_break).to be false
549           end
550           it 'サポート機能が動作している' do
551             expect(@label.form_name).to eq @model.item_name
552             expect(@label.field_name).to eq 'action_name'
553             expect(@label.model_name).to eq @model.item_name
554             expect(@label.column_name).to eq 'action_name'
555           end
556         end
557         describe 'tagに於いて' do
558           before do
559             @tag = @field.tag
560           end
561           it 'textタイプである' do
562             # text/number/text_area/select/hidden default: text
563             expect(@tag.type).to eq 'text'
564           end
565           it 'マニフェストから設定を取り出している' do
566             expect(@tag.options).to_not be_empty
567             expect(@tag.options['size']).to eq 20
568           end
569           it 'サポート機能が動作している' do
570             expect(@tag.form_name).to eq @model.item_name
571             expect(@tag.field_name).to eq 'action_name'
572           end
573         end
574       end
575       describe 'category_idに於いて' do
576         before do
577           @field = @ordered_fields[3]
578         end
579         it 'マニフェストから設定を取り出している' do
580           expect(@field.name).to eq 'category_id'
581           # default: true
582           expect(@field.row_break).to be true
583         end
584         it 'サポート機能が動作している' do
585           expect(@field.part?).to be false
586           expect(@field.form_name).to eq @model.item_name
587           expect(@field.column_name).to eq 'category_id'
588           expect(@field.model_name).to eq @model.item_name
589         end
590         describe 'labelに於いて' do
591           before do
592             @label = @field.label
593           end
594           it 'defaultタイプである' do
595             expect(@label.type).to eq 'default'
596           end
597           it 'マニフェストから設定を取り出している' do
598             # default: false
599             expect(@label.row_break).to be false
600           end
601           it 'サポート機能が動作している' do
602             expect(@label.form_name).to eq @model.item_name
603             expect(@label.field_name).to eq 'category_id'
604             expect(@label.model_name).to eq @model.item_name
605             expect(@label.column_name).to eq 'category_id'
606           end
607         end
608         describe 'tagに於いて' do
609           before do
610             @tag = @field.tag
611           end
612           it 'textタイプである' do
613             # text/number/text_area/select/hidden default: text
614             expect(@tag.type).to eq 'number'
615           end
616           it 'マニフェストから設定を取り出している' do
617             expect(@tag.options).to_not be_empty
618             expect(@tag.options['size']).to eq 5
619           end
620           it 'サポート機能が動作している' do
621             expect(@tag.form_name).to eq @model.item_name
622             expect(@tag.field_name).to eq 'category_id'
623           end
624         end
625       end
626       describe 'tに於いて' do
627         before do
628           @field = @ordered_fields[4]
629         end
630         it 'マニフェストから設定を取り出している' do
631           expect(@field.name).to eq 't'
632           # default: true
633           expect(@field.row_break).to be true
634         end
635         it 'サポート機能が動作している' do
636           expect(@field.part?).to be false
637           expect(@field.form_name).to eq @model.item_name
638           expect(@field.column_name).to eq 't'
639           expect(@field.model_name).to eq @model.item_name
640         end
641         describe 'labelに於いて' do
642           before do
643             @label = @field.label
644           end
645           it 'defaultタイプである' do
646             expect(@label.type).to eq 'default'
647           end
648           it 'マニフェストから設定を取り出している' do
649             # default: false
650             expect(@label.row_break).to be false
651           end
652           it 'サポート機能が動作している' do
653             expect(@label.form_name).to eq @model.item_name
654             expect(@label.field_name).to eq 't'
655             expect(@label.model_name).to eq @model.item_name
656             expect(@label.column_name).to eq 't'
657           end
658         end
659         describe 'tagに於いて' do
660           before do
661             @tag = @field.tag
662           end
663           it 'textタイプである' do
664             # text/number/text_area/select/hidden default: text
665             expect(@tag.type).to eq 'number'
666           end
667           it 'マニフェストから設定を取り出している' do
668             expect(@tag.options).to_not be_empty
669             expect(@tag.options['size']).to eq 5
670           end
671           it 'サポート機能が動作している' do
672             expect(@tag.form_name).to eq @model.item_name
673             expect(@tag.field_name).to eq 't'
674           end
675         end
676       end
677       describe 'parent_idに於いて' do
678         before do
679           @field = @ordered_fields[5]
680         end
681         it 'マニフェストから設定を取り出している' do
682           expect(@field.name).to eq 'parent_id'
683           # default: true
684           expect(@field.row_break).to be true
685         end
686         it 'サポート機能が動作している' do
687           expect(@field.part?).to be false
688           expect(@field.form_name).to eq @model.item_name
689           expect(@field.column_name).to eq 'parent_id'
690           expect(@field.model_name).to eq @model.item_name
691         end
692         describe 'labelに於いて' do
693           before do
694             @label = @field.label
695           end
696           it 'defaultタイプである' do
697             expect(@label.type).to eq 'default'
698           end
699           it 'マニフェストから設定を取り出している' do
700             # default: false
701             expect(@label.row_break).to be false
702           end
703           it 'サポート機能が動作している' do
704             expect(@label.form_name).to eq @model.item_name
705             expect(@label.field_name).to eq 'parent_id'
706             expect(@label.model_name).to eq @model.item_name
707             expect(@label.column_name).to eq 'parent_id'
708           end
709         end
710         describe 'tagに於いて' do
711           before do
712             @tag = @field.tag
713           end
714           it 'textタイプである' do
715             # text/number/text_area/select/hidden default: text
716             expect(@tag.type).to eq 'number'
717           end
718           it 'マニフェストから設定を取り出している' do
719             expect(@tag.options).to_not be_empty
720             expect(@tag.options['size']).to eq 5
721           end
722           it 'サポート機能が動作している' do
723             expect(@tag.form_name).to eq @model.item_name
724             expect(@tag.field_name).to eq 'parent_id'
725           end
726         end
727       end
728       describe 'lftに於いて' do
729         before do
730           @field = @ordered_fields[6]
731         end
732         it 'マニフェストから設定を取り出している' do
733           expect(@field.name).to eq 'lft'
734           # default: true
735           expect(@field.row_break).to be true
736         end
737         it 'サポート機能が動作している' do
738           expect(@field.part?).to be false
739           expect(@field.form_name).to eq @model.item_name
740           expect(@field.column_name).to eq 'lft'
741           expect(@field.model_name).to eq @model.item_name
742         end
743         describe 'labelに於いて' do
744           before do
745             @label = @field.label
746           end
747           it 'defaultタイプである' do
748             expect(@label.type).to eq 'default'
749           end
750           it 'マニフェストから設定を取り出している' do
751             # default: false
752             expect(@label.row_break).to be false
753           end
754           it 'サポート機能が動作している' do
755             expect(@label.form_name).to eq @model.item_name
756             expect(@label.field_name).to eq 'lft'
757             expect(@label.model_name).to eq @model.item_name
758             expect(@label.column_name).to eq 'lft'
759           end
760         end
761         describe 'tagに於いて' do
762           before do
763             @tag = @field.tag
764           end
765           it 'textタイプである' do
766             # text/number/text_area/select/hidden default: text
767             expect(@tag.type).to eq 'number'
768           end
769           it 'マニフェストから設定を取り出している' do
770             expect(@tag.options).to_not be_empty
771             expect(@tag.options['size']).to eq 5
772           end
773           it 'サポート機能が動作している' do
774             expect(@tag.form_name).to eq @model.item_name
775             expect(@tag.field_name).to eq 'lft'
776           end
777         end
778       end
779       describe 'rgtに於いて' do
780         before do
781           @field = @ordered_fields[7]
782         end
783         it 'マニフェストから設定を取り出している' do
784           expect(@field.name).to eq 'rgt'
785           # default: true
786           expect(@field.row_break).to be true
787         end
788         it 'サポート機能が動作している' do
789           expect(@field.part?).to be false
790           expect(@field.form_name).to eq @model.item_name
791           expect(@field.column_name).to eq 'rgt'
792           expect(@field.model_name).to eq @model.item_name
793         end
794         describe 'labelに於いて' do
795           before do
796             @label = @field.label
797           end
798           it 'defaultタイプである' do
799             expect(@label.type).to eq 'default'
800           end
801           it 'マニフェストから設定を取り出している' do
802             # default: false
803             expect(@label.row_break).to be false
804           end
805           it 'サポート機能が動作している' do
806             expect(@label.form_name).to eq @model.item_name
807             expect(@label.field_name).to eq 'rgt'
808             expect(@label.model_name).to eq @model.item_name
809             expect(@label.column_name).to eq 'rgt'
810           end
811         end
812         describe 'tagに於いて' do
813           before do
814             @tag = @field.tag
815           end
816           it 'textタイプである' do
817             # text/number/text_area/select/hidden default: text
818             expect(@tag.type).to eq 'number'
819           end
820           it 'マニフェストから設定を取り出している' do
821             expect(@tag.options).to_not be_empty
822             expect(@tag.options['size']).to eq 5
823           end
824           it 'サポート機能が動作している' do
825             expect(@tag.form_name).to eq @model.item_name
826             expect(@tag.field_name).to eq 'rgt'
827           end
828         end
829       end
830       describe 'depthに於いて' do
831         before do
832           @field = @ordered_fields[8]
833         end
834         it 'マニフェストから設定を取り出している' do
835           expect(@field.name).to eq 'depth'
836           # default: true
837           expect(@field.row_break).to be true
838         end
839         it 'サポート機能が動作している' do
840           expect(@field.part?).to be false
841           expect(@field.form_name).to eq @model.item_name
842           expect(@field.column_name).to eq 'depth'
843           expect(@field.model_name).to eq @model.item_name
844         end
845         describe 'labelに於いて' do
846           before do
847             @label = @field.label
848           end
849           it 'defaultタイプである' do
850             expect(@label.type).to eq 'default'
851           end
852           it 'マニフェストから設定を取り出している' do
853             # default: false
854             expect(@label.row_break).to be false
855           end
856           it 'サポート機能が動作している' do
857             expect(@label.form_name).to eq @model.item_name
858             expect(@label.field_name).to eq 'depth'
859             expect(@label.model_name).to eq @model.item_name
860             expect(@label.column_name).to eq 'depth'
861           end
862         end
863         describe 'tagに於いて' do
864           before do
865             @tag = @field.tag
866           end
867           it 'textタイプである' do
868             # text/number/text_area/select/hidden default: text
869             expect(@tag.type).to eq 'number'
870           end
871           it 'マニフェストから設定を取り出している' do
872             expect(@tag.options).to_not be_empty
873             expect(@tag.options['size']).to eq 5
874           end
875           it 'サポート機能が動作している' do
876             expect(@tag.form_name).to eq @model.item_name
877             expect(@tag.field_name).to eq 'depth'
878           end
879         end
880       end
881       describe 'idに於いて' do
882         before do
883           @field = @ordered_fields[9]
884         end
885         it 'マニフェストから設定を取り出している' do
886           expect(@field.name).to eq 'id'
887           expect(@field.row_break).to be true
888         end
889         it 'サポート機能が動作している' do
890           expect(@field.part?).to be false
891           expect(@field.form_name).to eq @model.item_name
892           expect(@field.column_name).to eq 'id'
893           expect(@field.model_name).to eq @model.item_name
894         end
895       end
896     end
897   end
898   
899   describe 'bucketに於いて' do
900     before do
901       @my_local_manifest = LocalManifest.manifest.buckets[@model.item_name]
902     end
903     it 'マニフェストから設定を取り出している' do
904       expect(@my_local_manifest.members).to be_empty
905       expect(@my_local_manifest.form_field_names).to be_empty
906     end
907     it 'サポート機能が動作している' do
908       expect(@my_local_manifest.has_member?).to be false
909       expect(@my_local_manifest.item_name).to eq @model.item_name
910     end
911   end
912   
913 end