rails setup test db

rails db:test:prepare
  1. rails: Executes the Rails framework command.
  2. db:test:prepare: Invokes the preparation of the test database based on the configuration specified in the Rails application. This command ensures that the test database schema is updated and synced with the development database schema.