Just wondering if there's a way to run Rails tests without dropping the database. I'm currently only executing unit tests and am using the following rake command to do so: rake test:units
.
Thanks for the help in advance!
Just in case this is relevant:
In Rails 5 (and possibly earlier versions), just comment-out the following line in spec/rails_helper.rb
:
ActiveRecord::Migration.maintain_test_schema!
This will prevent rake test
or rspec
from attempting to drop your test DB. You'll need to run migrations manually as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With