migration testing code example Example: how to resolve failing tests after database migration # in project directory RAILS_ENV=test bundle exec rake db:migrate