Fix NoDatabaseError test for AR < 4.1