OSDN Git Service

t#30200:update i18n devise
[pettanr/pettanr.git] / spec / controllers / original_picture_license_groups_controller_spec.rb
index 0501be4..0627395 100644 (file)
@@ -4,9 +4,9 @@ require 'spec_helper'
 
 describe OriginalPictureLicenseGroupsController do
   before do
-    FactoryGirl.create :admin
+    @admin = FactoryGirl.create :admin
     @user = FactoryGirl.create( :user_yas)
-    @author = @user.author
+    @author = FactoryGirl.create :author, :user_id => @user.id
     @artist = FactoryGirl.create :artist_yas, :author_id => @author.id
     @sp = FactoryGirl.create :system_picture
     @lg = FactoryGirl.create :license_group, :classname => 'PettanrUnknownV01License'
@@ -29,7 +29,7 @@ describe OriginalPictureLicenseGroupsController do
       end
       it '原画モデルに単体取得を問い合わせている' do
         OriginalPicture.stub(:show).with(any_args()).and_return(@op)
-        OriginalPicture.should_receive(:show).with(any_args()).exactly(1)\r
+        OriginalPicture.should_receive(:show).with(any_args()).exactly(1)
         get :new, @attr
       end
       it '@original_pictureにデータを用意している' do
@@ -41,7 +41,7 @@ describe OriginalPictureLicenseGroupsController do
         assigns(:original_picture_license_group).should be_a_new(OriginalPictureLicenseGroup)
       end
       it '原画ライセンスグループモデルにデフォルト値補充を依頼している' do
-        OriginalPictureLicenseGroup.any_instance.should_receive(:supply_default).exactly(1)\r
+        OriginalPictureLicenseGroup.any_instance.should_receive(:supply_default).exactly(1)
         get :new, @attr
       end
       context 'html形式' do
@@ -125,7 +125,7 @@ describe OriginalPictureLicenseGroupsController do
       end
       it '原画モデルに単体取得を問い合わせている' do
         OriginalPicture.stub(:show).with(any_args()).and_return(@op)
-        OriginalPicture.should_receive(:show).exactly(1)\r
+        OriginalPicture.should_receive(:show).exactly(1)
         post :create, @attr
       end
       it '@original_pictureにデータを用意している' do
@@ -134,7 +134,7 @@ describe OriginalPictureLicenseGroupsController do
       end
       it 'ライセンスグループモデルに単体取得を問い合わせている' do
         LicenseGroup.stub(:show).with(any_args()).and_return(@lg)
-        LicenseGroup.should_receive(:show).exactly(1)\r
+        LicenseGroup.should_receive(:show).exactly(1)
         post :create, @attr
       end
       it '@license_groupにデータを用意している' do