[英]Test a Rails 4 Engine with the dummy app
我想使用虛擬應用程序測試Rails 4 Engine,但是我不知道該怎么做。
我的引擎只有一個名為Event
模型。 起初我decomment在代碼event_test.rb
:
test "the truth" do
assert true
end
現在,我嘗試從虛擬應用程序的文件夾中啟動測試,但是我不知道必須使用哪個命令。 我嘗試了rake test
(什么都沒有發生)和rake test test/models/<engine-name>/event_test.rb
(錯誤:瑞克中止了!不知道如何構建任務...)。
如何啟動引擎測試?
Dummy
應用程序僅對您的engine
掛載點。 您不需要從dummy
目錄運行測試。 你(控制器,視圖,等。)從engine
應在提供dummy
應用程序,並從(控制器,視圖,等。) dummy
應在提供engine
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.