2

testこの構成が自分のデータベースと自分のデータベースの両方をクリーンアップしているように見えるのはなぜdevelopmentですか? development実行するたびに再シードする必要があるのはかなり面倒rspecです。

config.before(:suite) do
  DatabaseCleaner.strategy = :transaction
  DatabaseCleaner.clean_with(:truncation)
end

データベース.yml

development:
  adapter: postgresql
  database: m_development
  encoding: utf8
  pool: 5
  username: booltox
  password:

test:
  adapter: postgresql
  database: m_test
  encoding: utf8
  pool: 5
  username: booltox
  password:
4

1 に答える 1