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
For me it was a FactoryBot update from version 4 to 5. I didn't see the deprecation warning because I jumped versions:
4
5
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0.