diff --git a/spec/support/shared_examples/admin_examples.rb b/spec/support/shared_examples/admin_examples.rb index 88ca350cc..4e8535a41 100644 --- a/spec/support/shared_examples/admin_examples.rb +++ b/spec/support/shared_examples/admin_examples.rb @@ -9,11 +9,11 @@ shared_examples_for 'an admin controller' do user = User.first || FactoryGirl.create(:user) sign_in user get :index - response.should redirect_to('/404.html') + response.should render_template(file: "#{Rails.root}/public/404.html") end it 'is successful for admin users' do - user = User.first || FactoryGirl.create(:admin) + user = FactoryGirl.create(:admin) sign_in user get :index response.should be_success