Ran into this error message whilst developing tonight: SQLite3::BusyException: database is locked:
I have two models:
You may also have enabled threads when parallelizing your tests. Remember to disable the option in test/test_helper.rb :
parallelize(workers: :number_of_processors, with: :threads)
to
parallelize(workers: :number_of_processors)
https://edgeguides.rubyonrails.org/testing.html#parallel-testing-with-threads