"before_filter:authenticate、:only:> [:edit]"を使用しないと、このエラーが発生します。 失敗/エラー:response.should redirect_to(signin_path ) i "はbefore_filter:認証を、:のみ=> [編集]" を追加した場合、あなたがしている場合は、IAM失敗/エラー:response.should redirect_to(signin_path)
1) UsersController GET 'edit' should be successfull
Failure/Error: response.should be_success
expected success? to return true, got false
# ./spec/controllers/users_controller_spec.rb:102:in `block (3 levels) in <top (required)>'
2) UsersController GET 'edit' should have the right title
Failure/Error: response.should have_selector('title', :content => "Edit user")
expected following output to contain a <title>Edit user</title> tag:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>You are being <a href="http://test.host/signin">redirected</a>.</body></html>
# ./spec/controllers/users_controller_spec.rb:106:in `block (3 levels) in <top (required)>'
3) UsersController GET 'edit' should have a link to change the Gravatar
Failure/Error: response.should have_selector('a', :href => 'http://gravatar.com/emails',
expected following output to contain a <a href='http://gravatar.com/emails'>change</a> tag:
のようないくつかの他のエラーを取得しては私に可能な解決策....
.....私のために働いたの前にありがとう、多くの先生....私のコードをもう一度チェックするように私からの提案は... – shridhar