OSDN Git Service

fix spec
[pettanr/pettanr.git] / spec / peta / binder_spec.rb
index 498d3d1..bb17296 100644 (file)
@@ -3,43 +3,63 @@ require 'spec_helper'
 #スクロール
 
 describe Scroll do
+  include BinderMacros
   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
+  describe '生成メソッドに於いて' do
     before do
+      @item =  FactoryGirl.create :scroll_hello_with_scroll_panels, author: @author_yas
     end
     
-    context 'titleを検証するとき' do
-      it 'Shift JISなら失敗する' do
-        expect(Scroll.new.respond_to?(:leafs_items)).to be true
+    describe 'leaf_itemsに於いて' do
+      it 'ぶら下がるそれぞれのリーフを取得できる' do
+        define_leaf_items? @item, [ScrollPanel]
       end
     end
     
-    context 'titleを検証するとき' do
-      it 'Shift JISなら失敗する' do
-        expect(Scroll.new.respond_to?(:leafs_)).to be true
+    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 Comic do
+  include BinderMacros
   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
-    
-    context 'titleを検証するとき' do
-      it 'Shift JISなら失敗する' do
-        @scroll.title = 'a'
-        @scroll.should be_valid
-      end
-    end
-    
+end
+
+describe Story do
+  include BinderMacros
+  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
   
 end
+