I have turned ActiveRecord off in my Rails app in the environment config:
Rails::Initializer.run do |config| config.frameworks -= [:active_record] end
I have models that do not extend ActiveRecord::Base and I want to unit test these models. When I run the tests I get the uninitialized constant ActiveRecord::Base error.
How can I test my models when I don’t have active record on?
You could cheat. Add the following to your tests:
But first I’d recommend tracking down what is referring to ActiveRecord::Base. You think you aren’t using it, but you may be wrong.