2015-06-02 65 views
2

我刚把我的应用拉到边栏。我已经修复了大部分的兼容问题,但是测试,现在给象这样的错误:rails-controller-testing Gem

NoMethodError: assigns has been extracted to a gem. To continue using it, 
    add `gem 'rails-controller-testing'` to your Gemfile. 

第一次发生这种情况,我该:test组中添加gem 'rails-controller-testing'Gemfile就跑bundle。根据这个过程,该宝石现在安装在版本0.0.3,但我收到相同的错误。我如何解决它们?

+0

你可以请附上您的Gemfile添加呢? – Rahul

回答

0

尝试spec_helper.rb

RSpec.configure do |config| 
    [:controller, :view, :request].each do |type| 
    config.include ::Rails::Controller::Testing::TestProcess, :type => type 
    config.include ::Rails::Controller::Testing::TemplateAssertions, :type => type 
    config.include ::Rails::Controller::Testing::Integration, :type => type 
    end 
end