How to load all models when testing?

class NoDeleteCompanyError < RuntimeError; end

class Company < ActiveRecord::Base
   # model code

When I try to do:

assert_rais(NoDeleteCompanyError) { some_block }

It says that NoDeleteCompanyError is an uninitialized constant.

To fix this I just do fixtures :companies.

Is there anyway to default load all models when testing so I dont have
to do this?

Probably :wink: But another way would be to put your NoDeleteCompanyError into no_delete_company_error.rb in your models directory...