これは本当に私を無防備に捕らえました。stocks / index.html.hamlは、haml-rails gemをインストールした後、ブラウザーで問題なくレンダリングされます。しかし、rspec/capybaraを使用してテストしようとすると
describe "StockPages" do
describe "stocks/index.html.haml" do
before {visit stocks_path}
subject {page}
it { should have_selector('table#Result') }
end
end
このエラーが発生しました:
Failure/Error: before {visit stocks_path}
ActionView::MissingTemplate:
Missing template stocks/index, application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}.
どうすればこれを解決できますか?ありがとう