OSDN Git Service

fix spec
[pettanr/pettanr.git] / spec / peta / element_spec.rb
diff --git a/spec/peta/element_spec.rb b/spec/peta/element_spec.rb
new file mode 100644 (file)
index 0000000..ac1afd2
--- /dev/null
@@ -0,0 +1,110 @@
+# -*- encoding: utf-8 -*-
+require 'spec_helper'
+#スクロール
+
+describe Scroll do
+  include ElementMacros
+  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
+  
+end
+
+describe SheetPanel do
+  include ElementMacros
+  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
+
+describe PanelPicture do
+  include ElementMacros
+  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
+
+describe SpeechBalloon do
+  include ElementMacros
+  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
+
+describe Balloon do
+  include ElementMacros
+  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
+
+describe Speech do
+  include ElementMacros
+  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
+
+describe GroundPicture do
+  include ElementMacros
+  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
+
+describe GroundColor do
+  include ElementMacros
+  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