OSDN Git Service

fix test
[pettanr/pettanr.git] / spec / manifests / home_spec.rb
diff --git a/spec/manifests/home_spec.rb b/spec/manifests/home_spec.rb
new file mode 100644 (file)
index 0000000..932bcbc
--- /dev/null
@@ -0,0 +1,224 @@
+# -*- encoding: utf-8 -*-
+require 'spec_helper'
+# フォルダ
+
+describe HomeController do
+  include ManifestsMacros
+  before do
+    @model = Folder
+  end
+  
+  describe 'コントローラに於いて' do
+    before do
+      @controller = Manifest.manifest.controllers['home']
+    end
+    describe 'actionに於いて' do
+      before do
+        @actions = @controller.actions
+        @actions_names = ['scrolls', 'scroll_panels', 'comics', 'stories', 
+        'story_sheets', 'sheets', 'sheet_panels', 'panels', 
+        'panel_pictures', 'speech_balloons', 'speeches', 'balloons', 
+        'ground_pictures', 'ground_colors', 'original_pictures', 'resource_pictures']
+      end
+      it 'これらのアクションが定義されている' do
+        set_actions? @actions, @actions_names
+      end
+      describe 'baseに於いて' do
+      end
+      describe 'scrollsに於いて' do
+        before do
+          @action = @actions['scrolls']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'scroll', 'private'
+        end
+      end
+      describe 'scroll_panelsに於いて' do
+        before do
+          @action = @actions['scroll_panels']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'scroll_panel', 'private'
+        end
+      end
+      describe 'comicsに於いて' do
+        before do
+          @action = @actions['comics']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'comic', 'private'
+        end
+      end
+      describe 'storiesに於いて' do
+        before do
+          @action = @actions['stories']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'story', 'private'
+        end
+      end
+      describe 'story_sheetsに於いて' do
+        before do
+          @action = @actions['story_sheets']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'story_sheet', 'private'
+        end
+      end
+      describe 'sheetsに於いて' do
+        before do
+          @action = @actions['sheets']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'sheet', 'private'
+        end
+      end
+      describe 'sheet_panelsに於いて' do
+        before do
+          @action = @actions['sheet_panels']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'sheet_panel', 'private'
+        end
+      end
+      describe 'panelsに於いて' do
+        before do
+          @action = @actions['panels']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'panel', 'private'
+        end
+      end
+      describe 'panel_picturesに於いて' do
+        before do
+          @action = @actions['panel_pictures']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'panel_picture', 'private'
+        end
+      end
+      describe 'speech_balloonsに於いて' do
+        before do
+          @action = @actions['speech_balloons']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'speech_balloon', 'private'
+        end
+      end
+      describe 'speechesに於いて' do
+        before do
+          @action = @actions['speeches']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'speech', 'private'
+        end
+      end
+      describe 'balloonsに於いて' do
+        before do
+          @action = @actions['balloons']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'balloon', 'private'
+        end
+      end
+      describe 'ground_picturesに於いて' do
+        before do
+          @action = @actions['ground_pictures']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'ground_picture', 'private'
+        end
+      end
+      describe 'ground_colorsに於いて' do
+        before do
+          @action = @actions['ground_colors']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'ground_color', 'private'
+        end
+      end
+      describe 'original_picturesに於いて' do
+        before do
+          @action = @actions['original_pictures']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'original_picture', 'private'
+        end
+      end
+      describe 'resource_picturesに於いて' do
+        before do
+          @action = @actions['resource_pictures']
+        end
+        it 'listタイプのアクションである' do
+          expect(@action.type).to eq 'list'
+        end
+        it 'マニフェストから設定を取り出している' do
+          # 自分が投稿したアイテムのリストを返すように定義している
+          set_list_action? @action, 'resource_picture', 'private'
+        end
+      end
+    end
+    
+  end
+  
+end