From 3cf814ff9d16d761ec37a8189e5192a378ef13bb Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 25 Feb 2013 10:28:59 +0200 Subject: [PATCH] remove duplicate finder in features/steps/path --- features/steps/shared/paths.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index a8e68012..40786f6e 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -173,12 +173,10 @@ module SharedPaths # ---------------------------------------- And 'I visit project "Shop" page' do - project = Project.find_by_name("Shop") visit project_path(project) end When 'I visit edit project "Shop" page' do - project = Project.find_by_name("Shop") visit edit_project_path(project) end @@ -219,7 +217,7 @@ module SharedPaths end And 'I visit project "Shop" issues page' do - visit project_issues_path(Project.find_by_name("Shop")) + visit project_issues_path(project) end Given 'I visit issue page "Release 0.4"' do @@ -228,7 +226,7 @@ module SharedPaths end Given 'I visit project "Shop" labels page' do - visit project_labels_path(Project.find_by_name("Shop")) + visit project_labels_path(project) end Given 'I visit merge request page "Bug NS-04"' do @@ -242,20 +240,18 @@ module SharedPaths end And 'I visit project "Shop" merge requests page' do - visit project_merge_requests_path(Project.find_by_name("Shop")) + visit project_merge_requests_path(project) end Given 'I visit project "Shop" milestones page' do - @project = Project.find_by_name("Shop") - visit project_milestones_path(@project) + visit project_milestones_path(project) end Then 'I visit project "Shop" team page' do - visit project_team_index_path(Project.find_by_name("Shop")) + visit project_team_index_path(project) end Then 'I visit project "Shop" wall page' do - project = Project.find_by_name("Shop") visit wall_project_path(project) end @@ -266,4 +262,8 @@ module SharedPaths def root_ref @project.repository.root_ref end + + def project + project = Project.find_by_name!("Shop") + end end