database cleanerの設定について3点質問があります。
- suiteとallとがあるのですが、これらは何がどう違うのでしょうか?
config.before(:suite) do load Rails.root.join('db', 'seeds.rb') DatabaseCleaner.strategy = :truncation end config.before(:all) do load Rails.root.join('db', 'seeds.rb') DatabaseCleaner.strategy = :truncation end
- プロジェクトによって、上の設定が
rails_helper
に記載されていることがあるのですが、確かRSpecの設定はspec_helper
の方に描くべきという認識だったので困惑しています。
どっちでもいいのでしょうか?
お願いいたします
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/07 01:22