0
我的主要rails項目我已經安裝了一個通用代碼的引擎,可以執行常見的任務,如貨幣轉換。Rails引擎-RSpec測試
我可以引用該方法在這個普通發動機是這樣的:
MyCommon::CurrencyHelper.convert_to_currency
這正常項目的代碼,但似乎並沒有工作,當我改變RSpec的測試指向常用方法。
測試失敗,因爲它無法找到的常用方法:
NoMethodError: undefined method `convert_to_currency' for MyCommon::CurrencyHelper:Module
./spec/helpers/application_helper_spec.rb:211:in `block (3 levels) in <top (required)>'
我需要做點別的?
這是可能的:
因此,例如,
Stuff::BookingSlot.book_a_slot!
(其中Stuff
是引擎)會是這樣的測試? – user3437721