I have a Rails application that has models in multiple databases. It's like an admin interface that doesn't interact with a public API. Instead, it consumes the database directly.
For example, I have an Agent model that lives in the user database, and an Account model that lives in the account database.
class Agent < ApplicationRecord
self.table_name = 'users'
class Account < ApplicationRecord
self.table_name = 'accounts'
belongs_to :agent, foreign_key: :user_id
What will be the best approach to testing these models?, I don't have a way to replicate all these databases locally, since these are externals to my application.