Rspec 如何在spec_helper.rb中包含模块?

Rspec 如何在spec_helper.rb中包含模块?,rspec,paperclip,Rspec,Paperclip,我正在设置回形针宝石的测试,部分说明如下: 在spec_helper.rb中,您需要匹配器: require "paperclip/matchers" 并包括模块: Spec::Runner.configure do |config| config.include Paperclip::Shoulda::Matchers end 我想知道我是否应该粘贴: Spec::Runner.configure do |config| config.include Paperclip::Shou

我正在设置回形针宝石的测试,部分说明如下:

在spec_helper.rb中,您需要匹配器:

require "paperclip/matchers"
并包括模块:

Spec::Runner.configure do |config|
  config.include Paperclip::Shoulda::Matchers
end
我想知道我是否应该粘贴:

Spec::Runner.configure do |config|
  config.include Paperclip::Shoulda::Matchers
end
放入spec_helper.rb文件中,或者我是否应该将其放入其他人的文件中,并以某种方式在该文件中引用它


感谢您的帮助:)

Spec::Runner的最佳位置。configure
Spec\u helper.rb
Spec::Runner的最佳位置。configure
Spec\u helper.rb