require 'logger'

ActiveRecord::Base.logger = Logger.new("debug.log")

ActiveRecord::Base.configurations = {
  'unittest' => {
    :adapter  => 'sqlite3',
    :database => 'storebasestiname_unittest.sql',
  }
}

ActiveRecord::Base.establish_connection :unittest

require 'logger'

ActiveRecord::Base.logger = Logger.new("debug.log")

ActiveRecord::Base.establish_connection(
  :adapter  => 'sqlite3',
  :database => 'storebasestiname_unittest.sql',
)

Fix error that prevents tests from running on Rails 5.1:
Fix error that prevents tests from running on Rails 5.1:

`resolve_symbol_connection': 'unittest' database is not configured

It works with older version of Rails
