RSpecでマイグレーションをスキップさせる方法

結論

spec/rails_helper.rbActiveRecord::Migration.maintain_test_schema! をコメントアウトする

# ActiveRecord::Migration.maintain_test_schema!

背景

既存のデータベースを読み出し専用で扱う場合にこうしました*1

*1:レアケースでしょう

Powered by はてなブログ