MichaelHartlによるRubyonRailsチュートリアルで問題が発生しています。私は第10章の終わりにいて、大量の失敗したテストを受けています。私は自分のコードをMichaelがまとめたgithubリポジトリと比較しました。失敗したテストレポートは次のとおりです。
1) Authentication signin with valid information
Failure/Error: click_button "Sign in"
ActionView::Template::Error:
Missing partial shared/stats with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/Users/bobbysudekum/Documents/Projects/rails/Secondattempt/sample_app_three/app/views"
# ./app/views/users/show.html.erb:11:in `_app_views_users_show_html_erb___2309319721249673303_70162631795520'
# (eval):2:in `click_button'
# ./spec/requests/authentication_pages_spec.rb:34:in `block (4 levels) in <top (required)>'
2) Authentication signin with valid information
Failure/Error: click_button "Sign in"
ActionView::Template::Error:
Missing partial shared/stats with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/Users/bobbysudekum/Documents/Projects/rails/Secondattempt/sample_app_three/app/views"
# ./app/views/users/show.html.erb:11:in `_app_views_users_show_html_erb___2309319721249673303_70162631795520'
# (eval):2:in `click_button'
# ./spec/requests/authentication_pages_spec.rb:34:in `block (4 levels) in <top (required)>'
3) Authentication signin with valid information
Failure/Error: click_button "Sign in"
ActionView::Template::Error:
Missing partial shared/stats with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in:
* "/Users/bobbysudekum/Documents/Projects/rails/Secondattempt/sample_app_three/app/views"
# ./app/views/users/show.html.erb:11:in `_app_views_users_show_html_erb___2309319721249673303_70162631795520'
# (eval):2:in `click_button'
# ./spec/requests/authentication_pages_spec.rb:34:in `block (4 levels) in <top (required)>'
# REMOVED 43 more identical errors
githubから移植されたビュー
<% provide(:title, @user.name) %>
<div class="row">
<aside class="span4">
<section>
<h1>
<%= gravatar_for @user %>
<%= @user.name %>
</h1>
</section>
<section>
<%= render 'shared/stats' %>
</section>
</aside>
<div class="span8">
<%= render 'follow_form' if signed_in? %>
<% if @user.microposts.any? %>
<h3>Microposts (<%= @user.microposts.count %>)</h3>
<ol class="microposts">
<%= render @microposts %>
</ol>
<%= will_paginate @microposts %>
<% end %>
</div>
</div>
</div>
サンプルコードが含まれていないことをお詫びします-文字数制限を超えました。githubの残りのコードを参照してください-https ://github.com/rsudekum/sample_app_three
Rails / Rubyは初めてなので、失敗したテストで何を探すべきか本当にわかりません。誰かが私を正しい方向に向けることができれば、それは非常に義務的です。
よろしくお願いします。