From ef6e94e37e0fce23acf32992476aeb63405be0c1 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Sun, 21 Sep 2014 23:40:22 +0200 Subject: Replace old spinach step definitions with step. --- features/steps/project/snippets.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'features/steps/project/snippets.rb') diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index feae535fbea..2df7b007402 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -4,7 +4,7 @@ class 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 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 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 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 -- cgit v1.2.1