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'
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
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
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
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