diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-12 09:49:44 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-12 09:49:44 +0000 |
commit | 8949758ff3e8abe1b8cbf44137aa7adfe6e22493 (patch) | |
tree | 94d72b0657df465ea50fb349e8dcacb959518569 /features/steps/snippets/snippets.rb | |
parent | b07cf1182f78c5c46edbfa0fde668dd75ae47e05 (diff) | |
parent | 4c42fc7c4cc4d322109306c433f1c234bdcfc397 (diff) | |
download | gitlab-ce-8949758ff3e8abe1b8cbf44137aa7adfe6e22493.tar.gz |
Merge branch 'rs-expect-syntax-features' into 'master'
Prepare feature steps for RSpec 3
See merge request !803
Diffstat (limited to 'features/steps/snippets/snippets.rb')
-rw-r--r-- | features/steps/snippets/snippets.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb index de936db85ee..09fdd1b5a13 100644 --- a/features/steps/snippets/snippets.rb +++ b/features/steps/snippets/snippets.rb @@ -9,11 +9,11 @@ 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 - within ".file-title" do + page.within ".file-title" do click_link "Edit" end end @@ -25,15 +25,15 @@ 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" 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 |