summaryrefslogtreecommitdiff
path: root/features/steps/project/snippets.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-22 20:56:12 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-22 20:56:12 +0300
commitc31c8c55a4b805932ff24e08dc4cdacb497b1a82 (patch)
treef4654ca2c6872015fb1346f5318c9c2d5140e18d /features/steps/project/snippets.rb
parentfbdf34d7abc678435ab4a603e93dcc83cb89a981 (diff)
parentef6e94e37e0fce23acf32992476aeb63405be0c1 (diff)
downloadgitlab-ce-c31c8c55a4b805932ff24e08dc4cdacb497b1a82.tar.gz
Merge branch 'spinach-step' of https://github.com/cirosantilli/gitlabhq into cirosantilli-spinach-step
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Conflicts: features/steps/project/markdown_render.rb
Diffstat (limited to 'features/steps/project/snippets.rb')
-rw-r--r--features/steps/project/snippets.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index 273703e0efd..2f8d3205d6c 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -4,7 +4,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
include SharedNote
include SharedPaths
- And 'project "Shop" have "Snippet one" snippet' do
+ step 'project "Shop" have "Snippet one" snippet' do
create(:project_snippet,
title: "Snippet one",
content: "Test content",
@@ -13,7 +13,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
author: project.users.first)
end
- And 'project "Shop" have no "Snippet two" snippet' do
+ step 'project "Shop" have no "Snippet two" snippet' do
create(:snippet,
title: "Snippet two",
content: "Test content",
@@ -21,37 +21,37 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
author: project.users.first)
end
- Given 'I click link "New Snippet"' do
+ step 'I click link "New Snippet"' do
click_link "Add new snippet"
end
- Given 'I click link "Snippet one"' do
+ step 'I click link "Snippet one"' do
click_link "Snippet one"
end
- Then 'I should see "Snippet one" in snippets' do
+ step 'I should see "Snippet one" in snippets' do
page.should have_content "Snippet one"
end
- And 'I should not see "Snippet two" in snippets' do
+ step 'I should not see "Snippet two" in snippets' do
page.should_not have_content "Snippet two"
end
- And 'I should not see "Snippet one" in snippets' do
+ step 'I should not see "Snippet one" in snippets' do
page.should_not have_content "Snippet one"
end
- And 'I click link "Edit"' do
+ step 'I click link "Edit"' do
within ".file-title" do
click_link "Edit"
end
end
- And 'I click link "Remove Snippet"' do
+ step 'I click link "Remove Snippet"' do
click_link "remove"
end
- And 'I submit new snippet "Snippet three"' do
+ 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
@@ -60,32 +60,32 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
click_button "Create snippet"
end
- Then 'I should see snippet "Snippet three"' do
+ step 'I should see snippet "Snippet three"' do
page.should have_content "Snippet three"
page.should have_content "Content of snippet three"
end
- And 'I submit new title "Snippet new title"' do
+ step 'I submit new title "Snippet new title"' do
fill_in "project_snippet_title", :with => "Snippet new title"
click_button "Save"
end
- Then 'I should see "Snippet new title"' do
+ step 'I should see "Snippet new title"' do
page.should have_content "Snippet new title"
end
- And 'I leave a comment like "Good snippet!"' do
+ step 'I leave a comment like "Good snippet!"' do
within('.js-main-target-form') do
fill_in "note_note", with: "Good snippet!"
click_button "Add Comment"
end
end
- Then 'I should see comment "Good snippet!"' do
+ step 'I should see comment "Good snippet!"' do
page.should have_content "Good snippet!"
end
- And 'I visit snippet page "Snippet one"' do
+ step 'I visit snippet page "Snippet one"' do
visit project_snippet_path(project, project_snippet)
end