耐嚼的文档建议设置:bypass
测试策略,其中:
RSpec.configure do |config|
config.before(:suite) do
Chewy.strategy(:bypass)
end
end
但我得到一个:
undefined method `strategy' for Chewy:Module (NoMethodError)
这里我的spec_helper.rb
require 'devise'
require 'support/controller_macros'
require 'chewy/rspec'
RSpec.configure do |config|
config.before(:suite) do
Chewy.strategy(:bypass)
end
config.include Devise::TestHelpers, :type => :controller
config.extend ControllerMacros, :type => :controller
end
这里有什么建议吗?
提前致谢
耐嚼版本:0.6.2
导轨版本:4.1.7
rspec 版本:3.1.0