From d551a99da6678a6cc540702c5efaf8d586b60eb2 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 13 Jun 2019 20:51:27 +1200 Subject: [PATCH] set text in post body to find in post rss spec --- spec/views/posts/index.rss.haml_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/views/posts/index.rss.haml_spec.rb b/spec/views/posts/index.rss.haml_spec.rb index 83576079f..030e22c05 100644 --- a/spec/views/posts/index.rss.haml_spec.rb +++ b/spec/views/posts/index.rss.haml_spec.rb @@ -4,21 +4,21 @@ describe 'posts/index.rss.haml', type: "view" do before do controller.stub(:current_user) { nil } author = FactoryBot.create(:member) - @post1 = FactoryBot.create(:post, id: 1, author: author) + @post1 = FactoryBot.create(:post, id: 1, author: author, body: 'This is some text.') @post2 = FactoryBot.create(:post, id: 2, author: author) assign(:posts, [@post1, @post2]) render end it 'shows RSS feed title' do - rendered.should have_content "Recent posts from all members" + expect(rendered).to have_content "Recent posts from all members" end it 'shows content of posts' do - rendered.should have_content "This is some text." + expect(rendered).to have_content "This is some text." end it 'gives the author in the item title' do - rendered.should have_content "#{@post1.subject} by #{@post1.author}" + expect(rendered).to have_content "#{@post1.subject} by #{@post1.author}" end end