From 0c4a70a306b871899bf87ce4673918abfee4d95f Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Thu, 12 Feb 2015 19:17:35 +0100 Subject: Updated rspec to rspec 3.x syntax Signed-off-by: Jeroen van Baarsen --- spec/features/atom/dashboard_issues_spec.rb | 12 ++++++------ spec/features/atom/dashboard_spec.rb | 6 +++--- spec/features/atom/issues_spec.rb | 16 ++++++++-------- spec/features/atom/users_spec.rb | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'spec/features/atom') diff --git a/spec/features/atom/dashboard_issues_spec.rb b/spec/features/atom/dashboard_issues_spec.rb index 187f2ffcffd..ceeb3e6c5aa 100644 --- a/spec/features/atom/dashboard_issues_spec.rb +++ b/spec/features/atom/dashboard_issues_spec.rb @@ -17,12 +17,12 @@ describe "Dashboard Issues Feed", feature: true do it "should render atom feed via private token" do visit issues_dashboard_path(:atom, private_token: user.private_token) - response_headers['Content-Type'].should have_content("application/atom+xml") - body.should have_selector("title", text: "#{user.name} issues") - body.should have_selector("author email", text: issue1.author_email) - body.should have_selector("entry summary", text: issue1.title) - body.should have_selector("author email", text: issue2.author_email) - body.should have_selector("entry summary", text: issue2.title) + expect(response_headers['Content-Type']).to have_content("application/atom+xml") + expect(body).to have_selector("title", text: "#{user.name} issues") + expect(body).to have_selector("author email", text: issue1.author_email) + expect(body).to have_selector("entry summary", text: issue1.title) + expect(body).to have_selector("author email", text: issue2.author_email) + expect(body).to have_selector("entry summary", text: issue2.title) end end end diff --git a/spec/features/atom/dashboard_spec.rb b/spec/features/atom/dashboard_spec.rb index 52ade3e2d31..8e723b5c2ac 100644 --- a/spec/features/atom/dashboard_spec.rb +++ b/spec/features/atom/dashboard_spec.rb @@ -7,7 +7,7 @@ describe "Dashboard Feed", feature: true do context "projects atom feed via private token" do it "should render projects atom feed" do visit dashboard_path(:atom, private_token: user.private_token) - body.should have_selector("feed title") + expect(body).to have_selector("feed title") end end @@ -24,11 +24,11 @@ describe "Dashboard Feed", feature: true do end it "should have issue opened event" do - body.should have_content("#{user.name} opened issue ##{issue.iid}") + expect(body).to have_content("#{user.name} opened issue ##{issue.iid}") end it "should have issue comment event" do - body.should have_content("#{user.name} commented on issue ##{issue.iid}") + expect(body).to have_content("#{user.name} commented on issue ##{issue.iid}") end end end diff --git a/spec/features/atom/issues_spec.rb b/spec/features/atom/issues_spec.rb index 453dca69094..26422c8fdc0 100644 --- a/spec/features/atom/issues_spec.rb +++ b/spec/features/atom/issues_spec.rb @@ -13,10 +13,10 @@ describe "Issues Feed", feature: true do login_with user visit project_issues_path(project, :atom) - response_headers['Content-Type'].should have_content("application/atom+xml") - body.should have_selector("title", text: "#{project.name} issues") - body.should have_selector("author email", text: issue.author_email) - body.should have_selector("entry summary", text: issue.title) + expect(response_headers['Content-Type']).to have_content("application/atom+xml") + expect(body).to have_selector("title", text: "#{project.name} issues") + expect(body).to have_selector("author email", text: issue.author_email) + expect(body).to have_selector("entry summary", text: issue.title) end end @@ -24,10 +24,10 @@ describe "Issues Feed", feature: true do it "should render atom feed" do visit project_issues_path(project, :atom, private_token: user.private_token) - response_headers['Content-Type'].should have_content("application/atom+xml") - body.should have_selector("title", text: "#{project.name} issues") - body.should have_selector("author email", text: issue.author_email) - body.should have_selector("entry summary", text: issue.title) + expect(response_headers['Content-Type']).to have_content("application/atom+xml") + expect(body).to have_selector("title", text: "#{project.name} issues") + expect(body).to have_selector("author email", text: issue.author_email) + expect(body).to have_selector("entry summary", text: issue.title) end end end diff --git a/spec/features/atom/users_spec.rb b/spec/features/atom/users_spec.rb index de4f94fff2f..37af48282db 100644 --- a/spec/features/atom/users_spec.rb +++ b/spec/features/atom/users_spec.rb @@ -7,7 +7,7 @@ describe "User Feed", feature: true do context "user atom feed via private token" do it "should render user atom feed" do visit user_path(user, :atom, private_token: user.private_token) - body.should have_selector("feed title") + expect(body).to have_selector("feed title") end end -- cgit v1.2.3