I don't know if any of you is still having the issue, but for me moving
ENV["RAILS_ENV"] ||= 'test'
from rails_helper.rb to the top of spec_helper.rb fixed it. spec_helper.rb does a few things before loading rails_helper.rb, and something probably touches the database during that time.