2015-06-02 64 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