This code snippet is a reusable pattern for testing out a model/association structure in ActiveRecord to see whether it’s worth proceeding with. The snippet covers installing necessary dependencies, setting up an in-memory SQLite3 database, and loading a database schema into this database.

The example included in the pattern was prepared to demonstrate a has many through association between users and other users that are followed.