2
,我想包括位於此處的模塊: 測試/單位/助理/ test_helpers.rb未初始化的常量,而試圖包括幫助模塊
的樣子:
module TestHelpers
end
我想把它列入: 測試/單元/應用/模型/ abc.rb
class Abc < ActiveSupport::TestCase
include TestHelpers
end
提供了以下錯誤:
Error executing test/unit/app/models/abc.rb uninitialized constant Abc::TestHelpers
任何想法,爲什麼會發生這種情況?
幫助程序不包含在ruby包含樹中......用':: require'包含它 –