我正在使用SQLite的Rails 4.2.3。我有一個簡單的'assert'單元測試,使用內置的ActiveSupport :: TestCase。Rails 4生成測試數據庫
db/migrate中有一個遷移。
我不知道爲什麼下列原因的測試運行成功,我希望能得到一個「待定遷移」的錯誤:
rwc $ rake db:drop:all
rwc $ rake db:migrate:status
Schema migrations table does not exist yet.
rwc $ rake db:migrate:status RAILS_ENV=test
Schema migrations table does not exist yet.
rwc $ rake test
Run options: --seed 43484
# Running:
.
Finished in 0.011646s, 85.8671 runs/s, 85.8671 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
測試不與數據庫交互,我仍然希望那裏是由於未應用遷移而導致的錯誤。
任何人都可以解釋這種行爲嗎?