I want to disable ActiveAdmin when running the tests.
So I add require: false to the Gemfile and checking if defined?(ActiveAdmin) in routes and initializer.
But Rails still loads the models form app/admin thus I am getting error similar to /app/admin/admin_user.rb:1:in‘: uninitialized constant ActiveAdmin (NameError)`
What is the best way to “blacklist” the app/admin directory from being loaded?
1 Answer