OSDN Git Service

t#30200:update i18n devise
[pettanr/pettanr.git] / spec / models / speech_spec.rb
index 292155f..f3481f6 100644 (file)
@@ -3,12 +3,12 @@ require 'spec_helper'
 \r
 describe Speech do\r
   before do\r
-    FactoryGirl.create :admin\r
-    @sp = FactoryGirl.create :system_picture
-    @lg = FactoryGirl.create :license_group
-    @l = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
+    @admin = FactoryGirl.create :admin\r
+    @sp = FactoryGirl.create :system_picture\r
+    @lg = FactoryGirl.create :license_group\r
+    @l = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id\r
     @user = FactoryGirl.create( :user_yas)\r
-    @author = @user.author\r
+    @author = FactoryGirl.create :author, :user_id => @user.id\r
     \r
     @panel = FactoryGirl.create :panel\r
     @speech_balloon_template = FactoryGirl.create :speech_balloon_template\r
@@ -20,25 +20,25 @@ describe Speech do
       @speech = FactoryGirl.build :speech, :speech_balloon_id => @speech_balloon.id\r
     end\r
     \r
-    context 'オーソドックスなデータのとき' do
-      it '下限データが通る' do
-        @speech.x = 0
-        @speech.y = 0
-        @speech.width = 1
-        @speech.height = 1
-        @speech.should be_valid
-      end
-      it '上限データが通る' do
-        @speech.x = 99999
-        @speech.y = 99999
-        @speech.width = 99999
-        @speech.height = 99999
-        @speech.should be_valid
-      end
-    end
-    
+    context 'オーソドックスなデータのとき' do\r
+      it '下限データが通る' do\r
+        @speech.x = 0\r
+        @speech.y = 0\r
+        @speech.width = 1\r
+        @speech.height = 1\r
+        @speech.should be_valid\r
+      end\r
+      it '上限データが通る' do\r
+        @speech.x = 99999\r
+        @speech.y = 99999\r
+        @speech.width = 99999\r
+        @speech.height = 99999\r
+        @speech.should be_valid\r
+      end\r
+    end\r
+    \r
     context 'speech_balloon_idを検証するとき' do\r
-      #ネストの保存はnilを許可しなければならないので数値チェックだけ
+      #ネストの保存はnilを許可しなければならないので数値チェックだけ\r
       it 'テストデータの確認' do\r
         @speech.speech_balloon_id = @speech_balloon.id\r
         @speech.should be_valid\r