diff options
Diffstat (limited to 'features/steps/project/snippets.rb')
-rw-r--r-- | features/steps/project/snippets.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index 343aeb53b11..eedb4e1b74a 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -30,19 +30,19 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps end step 'I should see "Snippet one" in snippets' do - page.should have_content "Snippet one" + expect(page).to have_content "Snippet one" end step 'I should not see "Snippet two" in snippets' do - page.should_not have_content "Snippet two" + expect(page).not_to have_content "Snippet two" end step 'I should not see "Snippet one" in snippets' do - page.should_not have_content "Snippet one" + expect(page).not_to have_content "Snippet one" end step 'I click link "Edit"' do - within ".file-title" do + page.within ".file-title" do click_link "Edit" end end @@ -54,15 +54,15 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps step 'I submit new snippet "Snippet three"' do fill_in "project_snippet_title", :with => "Snippet three" fill_in "project_snippet_file_name", :with => "my_snippet.rb" - within('.file-editor') do + page.within('.file-editor') do find(:xpath, "//input[@id='project_snippet_content']").set 'Content of snippet three' end click_button "Create snippet" end step 'I should see snippet "Snippet three"' do - page.should have_content "Snippet three" - page.should have_content "Content of snippet three" + expect(page).to have_content "Snippet three" + expect(page).to have_content "Content of snippet three" end step 'I submit new title "Snippet new title"' do @@ -71,18 +71,18 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps end step 'I should see "Snippet new title"' do - page.should have_content "Snippet new title" + expect(page).to have_content "Snippet new title" end step 'I leave a comment like "Good snippet!"' do - within('.js-main-target-form') do + page.within('.js-main-target-form') do fill_in "note_note", with: "Good snippet!" click_button "Add Comment" end end step 'I should see comment "Good snippet!"' do - page.should have_content "Good snippet!" + expect(page).to have_content "Good snippet!" end step 'I visit snippet page "Snippet one"' do |