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

时间:2012-05-22 19:25:20

标签: 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::Shoulda::Matchers
end

进入spec_helper.rb文件或者我应该把它放到其他人身上并在此文件中以某种方式引用它。

感谢您的帮助:)

0 个答案:

没有答案
相关问题