在Rails 4.0.2應用程序中,當使用MiniTest運行rake test
時,測試將分批運行,而不是報告所有測試的合計通過/失敗編號。也就是說,模型測試作爲一個批次運行,集成測試作爲另一個批處理運行。從rake test
一個調用我的輸出是這樣的:測試套件使用MiniTest分兩批運行
Loaded Suite test,test/integration,test/models
# All the model tests run and print their output here
18 tests, 18 passed, 0 failures, 0 errors, 1 skips, 40 assertions
Loaded Suite test,test/integration,test/models
# All the integration tests run and print their output here
5 tests, 5 passed, 0 failures, 0 errors, 0 skips, 24 assertions
當我運行rake test:all
這並沒有發生。我使用內置的MiniTest跑步者和轉身跑步者進行了測試。都表現出這種行爲。
是否故意MiniTest在運行時將測試劃分爲批次rake test
而不是rake test:all
?
我做了一個bundle update
,我的測試寶石都沒有版本限制,所以我相信一切都是最新的。寶石版本:
- 的Rails 4.0.2
- MINITEST 4.7.5
- MINITEST的Rails 0.9.2
這很奇怪!套件中的文件總是一樣的嗎? – phoet