blog.robotex.de

Rails, Active Admin, Rspec: Fixing uninitialized constant Admin::DashboardController with

when trying to test an active admin backend with Rspec, you can stumble upon following error:

  ActionController::RoutingError:
    uninitialized constant Admin::DashboardController

If this happens, append following lines to your spec/rails_helper.rb:

# spec/rails_helper.rb
require_relative 'dummy/app/admin/dashboard'
require_relative 'dummy/config/routes'

Back