OSDN Git Service

t#30200:update i18n devise
[pettanr/pettanr.git] / spec / models / speech_balloon_template_spec.rb
index 01a5bbc..e0f4e88 100644 (file)
@@ -15,12 +15,12 @@ describe SpeechBalloonTemplate do
     @jes = JSON.parse @tes
     
     @admin = FactoryGirl.create :admin
-    @user = FactoryGirl.create( :user_yas)\r
-    @author = @user.author\r
-    @artist = FactoryGirl.create :artist_yas, :author_id => @author.id\r
-    @other_user = FactoryGirl.create( :user_yas)\r
-    @other_author = @other_user.author\r
-    @other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id\r
+    @user = FactoryGirl.create( :user_yas)
+    @author = FactoryGirl.create :author, :user_id => @user.id
+    @artist = FactoryGirl.create :artist_yas, :author_id => @author.id
+    @other_user = FactoryGirl.create( :user_yas)
+    @other_author = FactoryGirl.create :author, :user_id => @other_user.id
+    @other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
   end
   
   describe '検証に於いて' do
@@ -126,7 +126,7 @@ describe SpeechBalloonTemplate do
       @st.overwrite
       @st.t.should eq 2
     end
-    context 'つつがなく終わるとき' do\r
+    context 'つつがなく終わるとき' do
       before do
         @st = FactoryGirl.create :speech_balloon_template, :t => 0
       end
@@ -141,22 +141,22 @@ describe SpeechBalloonTemplate do
     before do
       @st = FactoryGirl.build :speech_balloon_template
     end
-    it '許可する' do\r
+    it '許可する' do
       @st.visible?(@author).should == true
-    end\r
+    end
   end
   
   describe '一覧取得に於いて' do
     before do
       @st = FactoryGirl.create :speech_balloon_template
     end
-    context 'つつがなく終わるとき' do\r
-      it '一覧取得オプションを利用している' do\r
-        SpeechBalloonTemplate.stub(:list_opt).with(any_args).and_return({})\r
-        SpeechBalloonTemplate.should_receive(:list_opt).with(any_args).exactly(1)\r
+    context 'つつがなく終わるとき' do
+      it '一覧取得オプションを利用している' do
+        SpeechBalloonTemplate.stub(:list_opt).with(any_args).and_return({})
+        SpeechBalloonTemplate.should_receive(:list_opt).with(any_args).exactly(1)
         r = SpeechBalloonTemplate.list
-      end\r
-    end\r
+      end
+    end
     it 'リストを返す' do
       l = SpeechBalloonTemplate.list
       l.should eq [@st]
@@ -186,13 +186,13 @@ describe SpeechBalloonTemplate do
     before do
       @st = FactoryGirl.create :speech_balloon_template
     end
-    context 'つつがなく終わるとき' do\r
-      it '単体取得オプションを利用している' do\r
-        SpeechBalloonTemplate.stub(:show_opt).with(any_args).and_return({})\r
-        SpeechBalloonTemplate.should_receive(:show_opt).with(any_args).exactly(1)\r
+    context 'つつがなく終わるとき' do
+      it '単体取得オプションを利用している' do
+        SpeechBalloonTemplate.stub(:show_opt).with(any_args).and_return({})
+        SpeechBalloonTemplate.should_receive(:show_opt).with(any_args).exactly(1)
         r = SpeechBalloonTemplate.show @st.id, @author
-      end\r
-    end\r
+      end
+    end
     it '指定のフキダシテンプレートを返す' do
       l = SpeechBalloonTemplate.show @st.id, @author
       l.should eq @st
@@ -205,13 +205,13 @@ describe SpeechBalloonTemplate do
         }.should raise_error(ActiveRecord::Forbidden)
       end
     end
-    context '存在しないフキダシテンプレートを開こうとしたとき' do\r
-      it '404RecordNotFound例外を返す' do\r
-        lambda{\r
-          SpeechBalloonTemplate.show 110, @author\r
-        }.should raise_error(ActiveRecord::RecordNotFound)\r
-      end\r
-    end\r
+    context '存在しないフキダシテンプレートを開こうとしたとき' do
+      it '404RecordNotFound例外を返す' do
+        lambda{
+          SpeechBalloonTemplate.show 110, @author
+        }.should raise_error(ActiveRecord::RecordNotFound)
+      end
+    end
   end
   describe '単体出力オプションに於いて' do
     it '空のHashを返す' do