I want to test my namespaced controllers but when I raise controller nothing raised and test is passing. I get no routes error. They all work fine. But it must raise error. Actually it must call index action but it does not. What is the cause?
dashboard_controller_spec.rb
require 'spec_helper'
describe Admin::DashboardController do
it "gets index" do
get :index
end
end
routes.rb
namespace :admin do
match 'dashboard' => 'dashboard#index', :as => :dashboard
end
dashboard_controller.rb
class Admin::DashboardController < Admin::ApplicationController
def index
raise "asd"
end
end