From 69bbc413fec7aa4168d9ff12df5421674db90032 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 12 Jun 2015 00:44:13 -0400 Subject: Update all `should`-style syntax to `expect` in features --- features/steps/snippets/snippets.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'features/steps/snippets/snippets.rb') diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb index de936db85ee..0f56fb03068 100644 --- a/features/steps/snippets/snippets.rb +++ b/features/steps/snippets/snippets.rb @@ -9,7 +9,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps end step 'I should not see "Personal snippet one" in snippets' do - page.should_not have_content "Personal snippet one" + expect(page).not_to have_content "Personal snippet one" end step 'I click link "Edit"' do @@ -32,8 +32,8 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps end step 'I should see snippet "Personal snippet three"' do - page.should have_content "Personal snippet three" - page.should have_content "Content of snippet three" + expect(page).to have_content "Personal snippet three" + expect(page).to have_content "Content of snippet three" end step 'I submit new title "Personal snippet new title"' do @@ -42,7 +42,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps end step 'I should see "Personal snippet new title"' do - page.should have_content "Personal snippet new title" + expect(page).to have_content "Personal snippet new title" end step 'I uncheck "Private" checkbox' do @@ -51,7 +51,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps end step 'I should see "Personal snippet one" public' do - page.should have_no_xpath("//i[@class='public-snippet']") + expect(page).to have_no_xpath("//i[@class='public-snippet']") end step 'I visit snippet page "Personal snippet one"' do -- cgit v1.2.1 From 584f8601eff79fe6e400026ba6db086002ce2cba Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Fri, 12 Jun 2015 01:36:00 -0400 Subject: Change `within` to `page.within` in feature steps --- features/steps/snippets/snippets.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/snippets/snippets.rb') diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb index 0f56fb03068..09fdd1b5a13 100644 --- a/features/steps/snippets/snippets.rb +++ b/features/steps/snippets/snippets.rb @@ -13,7 +13,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps end step 'I click link "Edit"' do - within ".file-title" do + page.within ".file-title" do click_link "Edit" end end @@ -25,7 +25,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps step 'I submit new snippet "Personal snippet three"' do fill_in "personal_snippet_title", :with => "Personal snippet three" fill_in "personal_snippet_file_name", :with => "my_snippet.rb" - within('.file-editor') do + page.within('.file-editor') do find(:xpath, "//input[@id='personal_snippet_content']").set 'Content of snippet three' end click_button "Create snippet" -- cgit v1.2.1