I recently upgraded to Rails 5.1 from v4.3 and am now getting this error when running tests:
An error occurred while loading
./spec/controllers/admin/capac
My two-cents, as it may help someone else. I had this same issue when upgrading rails 4.2
to 5.0
I saw a thread post somewhere that suggested running one spec-test by itself / at a time. When I did that, I got a different error: superclass must be a Class
and pointed me to my new .../models/application_record.rb
file, in which I had made a syntax error by omission:
class ApplicationRecord < ActiveRecord
self.abstract_class = true
end
The above is missing ::Base
after ActiveRecord
-- first line.
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
Adding that back in fixed all my specs.