check for ActiveRecord (to handle non AR apps)

We don't use AR (we use mongo only) so the tests wouldn't run. I just added a conditional to check if AR was defined.