【发布时间】:2016-03-17 02:28:59
【问题描述】:
如何避免在 Rails 4.2.5 应用程序中调用我的 rspec 模型测试?
我在 application.rb 中有config.autoload_paths << Rails.root.join('lib')
然而,在我的 rspec 模型测试 (spec/models/other_test_spec.rb) 中没有使用 require_relative,我似乎无法加载 FileService 类:
require_relative '../../lib/adapter/file_service'
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 rspec