私はこのサイトから学んでいます。以下を rspec でテストしたところ、合格しました。
describe "About page" do
it "should have the content 'About Us'" do
visit '/static_pages/about'
expect(page).to have_content('About Us')
end
end
期待どおりに動作するかどうかを確認するために に変更About Us
しましたが、文字列が であってもテストに失敗します。rspecファイルでhtmlタグ式を使用する方法を教えてください。<h1>About Us</h1>
about.html.erb
<h1>About Us</h1>