Please sign in to comment.
Fix case where Rails engine testing may result in a not yet connected…
… database. In the project I was working on, I was encountering a point where the ActiveRecord::Base.connection_pool had not yet been connected. This raised an exception. This patch catches the current exception that is thrown. I'm not entirely satisified with the exception handling, as it relates to the inner working of ActiveRecord::Base; However, NullDB is meant to be an ActiveRecord adaptor, so this is perhaps germain to the test suite.
- Loading branch information...
Showing with 10 additions and 1 deletion.