rails tests uninitialized constant ActiveRecord
Problem: while running tests you get
uninitialized constant ActiveRecord (NameError)
Solution: in my case it was that I was tired and ran the tests no on the test class bu on the model class! Strange error though.