2012-07-24 85 views
1

我已经在我的应用程序,以确保一切工作的功能和定制化管理的轨道安装,因为它应该,我想为它Rspec的 - 测试rails_admin定制

我试图做一些测试完成这样的事情

require 'spec_helper' 

describe RailsAdmin::MainController do 
    render_views 

    let(:admin) { FactoryGirl.create(:admin_user) } 

    describe "should manage a dashboard" do 

    before :each do 
     sign_in admin 
    end 

    it "should render dashboard" do 
     get :dashboard 
     response.should be_success 
    end 
    end 
end 

这是工作时间以前,但突然每次运行我收到此错误

Failure/Error: get :dashboard 
    ActionController::RoutingError: 
    No route matches {:controller=>"rails_admin/main", :action=>"dashboard"} 

这里的规范是我的规格助手0123的副本https://gist.github.com/3173172

回答