OSDN Git Service

t#30143:au and ar change
[pettanr/pettanr.git] / spec / controllers / artists_controller_spec.rb
index c6ae277..0c61680 100644 (file)
@@ -125,9 +125,9 @@ describe ArtistsController do
         Artist.should_receive(:show).exactly(1)
         get :show
       end
-      it '@artistにアレを取得している' do
+      it '@arにアレを取得している' do
         get :show, :id => @artist.id
-        assigns(:artist).should eq(@artist)
+        assigns(:ar).should eq(@artist)
       end
       context 'html形式' do
         it 'showテンプレートを描画する' do
@@ -321,10 +321,10 @@ describe ArtistsController do
       end
     end
     context 'つつがなく終わるとき' do
-      it "@artistに作成された絵師を保持していて、それがDBにある" do
+      it "@arに作成された絵師を保持していて、それがDBにある" do
         post :create, :artist => @attr
-        assigns(:artist).should be_a(Artist)
-        assigns(:artist).should be_persisted
+        assigns(:ar).should be_a(Artist)
+        assigns(:ar).should be_persisted
       end
       context 'html形式' do
         it 'ステータスコード302 Foundを返す' do
@@ -332,10 +332,10 @@ describe ArtistsController do
           post :create, :artist => @attr
           response.status.should eq 302
         end
-        it '作成された絵師の表示ページへ遷移する' do
+        it 'トップページへ遷移する' do
 #          Artist.any_instance.stub(:save).and_return(true)
           post :create, :artist => @attr
-          response.should redirect_to(Artist.last)
+          response.should redirect_to(root_path)
         end
       end
       context 'json形式' do
@@ -497,9 +497,9 @@ describe ArtistsController do
         Artist.any_instance.should_receive(:save).exactly(1)
         put :update, :id => @artist.id, :artist => @attr
       end
-      it '@artistにアレを取得している' do
+      it '@arにアレを取得している' do
         put :update, :id => @artist.id, :artist => @attr
-        assigns(:artist).should eq @artist
+        assigns(:ar).should eq @artist
       end
     end
     context 'つつがなく終わるとき' do
@@ -513,9 +513,9 @@ describe ArtistsController do
           put :update, :id => @artist.id, :artist => @attr
           response.status.should eq 302
         end
-        it '更新された絵師の表示ページへ遷移する' do
+        it '設定ページへ遷移する' do
           put :update, :id => @artist.id, :artist => @attr
-          response.should redirect_to(@artist)
+          response.should redirect_to('/home/configure')
         end
       end
       context 'json形式' do