好きこそ 物ノ上手ナレ

What one likes, one will do well.

Failure/Error: specify { expect(response).to redirect_to(signin_path) }

Railsチュートリアルにて。

Rspecのエラーが通らない、
NoMethodErrorで次のような内容。

Authentication authorization for non-signed-in users in the Users controller submitting to the update action Failure/Error: specify { expect(response).to redirect_to(signin_path) } NoMethodError:

 

rspecのバージョンアップで解決します。

gem "rspec-rails", '~> 2.14.0.rc1'
を書いて
$ bundle update

 

追記
GemfileにRubygems.orgから新しいgemだとうまくいかなかった。
gem 'rspec-rails', '~> 3.2.0'
gem 'capybara', '~> 2.4.4'

$ bundle update

テストが大量に失敗・・・
っていう感じで、泥沼だったので。以上。

 

参考
http://stackoverflow.com/questions/24801396/michael-hartl-chapter9-authorization-error