Rase errors when the Rails environment is 'test'