OSDN Git Service

fix spec
[pettanr/pettanr.git] / spec / peta / root_spec.rb
diff --git a/spec/peta/root_spec.rb b/spec/peta/root_spec.rb
new file mode 100644 (file)
index 0000000..34354e4
--- /dev/null
@@ -0,0 +1,80 @@
+# -*- encoding: utf-8 -*-
+require 'spec_helper'
+#スクロール
+
+describe Sheet do
+  include RootMacros
+  before do
+    @admin =FactoryGirl.create :admin
+    @user_yas = FactoryGirl.create :user_yas_with_owner
+    @user_rom = FactoryGirl.create :user_rom
+    @author_yas =  @user_yas.author
+  end
+  
+  describe '生成メソッドに於いて' do
+    before do
+      @item =  FactoryGirl.create :scroll_hello_with_scroll_panels, author: @author_yas
+    end
+    
+    describe 'leaf_itemsに於いて' do
+      it 'ぶら下がるそれぞれのリーフを取得できる' do
+        define_leaf_items? @item, [ScrollPanel]
+      end
+    end
+    
+    describe 'leafs_itemsに於いて' do
+      it 'すべてのリーフを取得できる' do
+        define_leafs_items? @item, [ScrollPanel]
+      end
+    end
+    
+  end
+  
+  describe 'boostに於いて' do
+    before do
+      @item =  FactoryGirl.create :scroll_hello_with_scroll_panels, author: @author_yas
+    end
+    
+    it 'ブーストメッセージをリーフに伝搬する' do
+    end
+  end
+  
+end
+
+describe Panel do
+  include RootMacros
+  before do
+    @admin =FactoryGirl.create :admin
+    @user_yas = FactoryGirl.create :user_yas_with_owner
+    @user_rom = FactoryGirl.create :user_rom
+    @author_yas =  @user_yas.author
+  end
+  
+  describe '生成メソッドに於いて' do
+    before do
+    end
+    
+    describe 'leaf_itemsに於いて' do
+      it 'ぶら下がるそれぞれのリーフを取得できる' do
+        define_leaf_items? @item, [ComicStory]
+      end
+    end
+    
+    describe 'leafs_itemsに於いて' do
+      it 'すべてのリーフを取得できる' do
+        define_leafs_items? @item, [ComicStory]
+      end
+    end
+    
+  end
+  
+  describe 'boostに於いて' do
+    before do
+      @item =  FactoryGirl.create :scroll_hello_with_scroll_panels, author: @author_yas
+    end
+    
+    it 'ブーストメッセージをリーフに伝搬する' do
+    end
+  end
+  
+end