为什么此配置似乎同时清理了我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: