I want to perform unit tests but the model object in question is actually linked to an external database table. So I don't actually have the database table in my local database which I need to run unit tests. Any ideas on how to approach this? I have created a sample fixtures yml file that has a subset of data from my external database table I'd like to use.
My setup:
I have a rake task that populates a schema based on a predefined legacy table. I connect to that table via:
class ExternalDBEvent < ActiveRecord::Base establish_connection :external_db set_table_name :event end
I have connection parameters defined in database.yml