summaryrefslogtreecommitdiff
path: root/features/steps/snippets
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-12 09:49:44 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-12 09:49:44 +0000
commit8949758ff3e8abe1b8cbf44137aa7adfe6e22493 (patch)
tree94d72b0657df465ea50fb349e8dcacb959518569 /features/steps/snippets
parentb07cf1182f78c5c46edbfa0fde668dd75ae47e05 (diff)
parent4c42fc7c4cc4d322109306c433f1c234bdcfc397 (diff)
downloadgitlab-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')
-rw-r--r--features/steps/snippets/discover.rb6
-rw-r--r--features/steps/snippets/public_snippets.rb4
-rw-r--r--features/steps/snippets/snippets.rb14
-rw-r--r--features/steps/snippets/user.rb18
4 files changed, 21 insertions, 21 deletions
diff --git a/features/steps/snippets/discover.rb b/features/steps/snippets/discover.rb
index 2667c1e3d44..76379d09d02 100644
--- a/features/steps/snippets/discover.rb
+++ b/features/steps/snippets/discover.rb
@@ -4,15 +4,15 @@ class Spinach::Features::SnippetsDiscover < Spinach::FeatureSteps
include SharedSnippet
step 'I should see "Personal snippet one" in snippets' do
- page.should have_content "Personal snippet one"
+ expect(page).to have_content "Personal snippet one"
end
step 'I should see "Personal snippet internal" in snippets' do
- page.should have_content "Personal snippet internal"
+ expect(page).to have_content "Personal snippet internal"
end
step 'I should not see "Personal snippet private" in snippets' do
- page.should_not have_content "Personal snippet private"
+ expect(page).not_to have_content "Personal snippet private"
end
def snippet
diff --git a/features/steps/snippets/public_snippets.rb b/features/steps/snippets/public_snippets.rb
index 67669dc0a69..2ebdca5ed30 100644
--- a/features/steps/snippets/public_snippets.rb
+++ b/features/steps/snippets/public_snippets.rb
@@ -4,11 +4,11 @@ class Spinach::Features::PublicSnippets < Spinach::FeatureSteps
include SharedSnippet
step 'I should see snippet "Personal snippet one"' do
- page.should have_no_xpath("//i[@class='public-snippet']")
+ expect(page).to have_no_xpath("//i[@class='public-snippet']")
end
step 'I should see raw snippet "Personal snippet one"' do
- page.should have_text(snippet.content)
+ expect(page).to have_text(snippet.content)
end
step 'I visit snippet page "Personal snippet one"' do
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
diff --git a/features/steps/snippets/user.rb b/features/steps/snippets/user.rb
index 146cc535d88..007fcb2893f 100644
--- a/features/steps/snippets/user.rb
+++ b/features/steps/snippets/user.rb
@@ -8,43 +8,43 @@ class Spinach::Features::SnippetsUser < Spinach::FeatureSteps
end
step 'I should see "Personal snippet one" in snippets' do
- page.should have_content "Personal snippet one"
+ expect(page).to have_content "Personal snippet one"
end
step 'I should see "Personal snippet private" in snippets' do
- page.should have_content "Personal snippet private"
+ expect(page).to have_content "Personal snippet private"
end
step 'I should see "Personal snippet internal" in snippets' do
- page.should have_content "Personal snippet internal"
+ expect(page).to have_content "Personal snippet internal"
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 should not see "Personal snippet private" in snippets' do
- page.should_not have_content "Personal snippet private"
+ expect(page).not_to have_content "Personal snippet private"
end
step 'I should not see "Personal snippet internal" in snippets' do
- page.should_not have_content "Personal snippet internal"
+ expect(page).not_to have_content "Personal snippet internal"
end
step 'I click "Internal" filter' do
- within('.nav-tabs') do
+ page.within('.nav-tabs') do
click_link "Internal"
end
end
step 'I click "Private" filter' do
- within('.nav-tabs') do
+ page.within('.nav-tabs') do
click_link "Private"
end
end
step 'I click "Public" filter' do
- within('.nav-tabs') do
+ page.within('.nav-tabs') do
click_link "Public"
end
end