diff options
author | Guilherme Garnier <guilherme.garnier@gmail.com> | 2015-10-03 19:59:54 -0500 |
---|---|---|
committer | Guilherme Garnier <guilherme.garnier@gmail.com> | 2015-10-03 19:59:54 -0500 |
commit | 963e6366be870bc78037424a5e9d150f342dcfac (patch) | |
tree | 9835d868780996f8e1b7371b47f3e5afa211d483 /features | |
parent | aed145a9c68f5130a8e46602c4b6f1b76c8c13bf (diff) | |
download | gitlab-ce-963e6366be870bc78037424a5e9d150f342dcfac.tar.gz |
Fix rubocop warnings in features
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/groups.rb | 50 | ||||
-rw-r--r-- | features/steps/project/graph.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 4 | ||||
-rw-r--r-- | features/steps/project/redirects.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/group.rb | 2 |
5 files changed, 29 insertions, 31 deletions
diff --git a/features/steps/groups.rb b/features/steps/groups.rb index 95bc9baf8d8..69ddfa42c06 100644 --- a/features/steps/groups.rb +++ b/features/steps/groups.rb @@ -282,9 +282,9 @@ class Spinach::Features::Groups < Spinach::FeatureSteps milestone1_project2 = create :milestone, title: "Version 7.2", project: project2 - milestone1_project3 = create :milestone, - title: "Version 7.2", - project: @project3 + create :milestone, + title: "Version 7.2", + project: @project3 milestone2_project1 = create :milestone, title: "GL-113", project: @project1 @@ -301,28 +301,28 @@ class Spinach::Features::Groups < Spinach::FeatureSteps assignee: current_user, author: current_user, milestone: milestone2_project1 - issue2 = create :issue, - project: project2, - assignee: current_user, - author: current_user, - milestone: milestone1_project2 - issue3 = create :issue, - project: @project3, - assignee: current_user, - author: current_user, - milestone: milestone1_project1 - mr1 = create :merge_request, - source_project: @project1, - target_project: @project1, - assignee: current_user, - author: current_user, - milestone: milestone2_project1 - mr2 = create :merge_request, - source_project: project2, - target_project: project2, - assignee: current_user, - author: current_user, - milestone: milestone2_project2 + create :issue, + project: project2, + assignee: current_user, + author: current_user, + milestone: milestone1_project2 + create :issue, + project: @project3, + assignee: current_user, + author: current_user, + milestone: milestone1_project1 + create :merge_request, + source_project: @project1, + target_project: @project1, + assignee: current_user, + author: current_user, + milestone: milestone2_project1 + create :merge_request, + source_project: project2, + target_project: project2, + assignee: current_user, + author: current_user, + milestone: milestone2_project2 @mr3 = create :merge_request, source_project: @project3, target_project: @project3, diff --git a/features/steps/project/graph.rb b/features/steps/project/graph.rb index 9453d636445..4abd5288d51 100644 --- a/features/steps/project/graph.rb +++ b/features/steps/project/graph.rb @@ -32,6 +32,6 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps end def project - project ||= Project.find_by(name: "Shop") + @project ||= Project.find_by(name: "Shop") end end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 239392eab96..af2da41badb 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -223,11 +223,11 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'project \'Shop\' has issue \'Bugfix1\' with description: \'Description for issue1\'' do - issue = create(:issue, title: 'Bugfix1', description: 'Description for issue1', project: project) + create(:issue, title: 'Bugfix1', description: 'Description for issue1', project: project) end step 'project \'Shop\' has issue \'Feature1\' with description: \'Feature submitted for issue1\'' do - issue = create(:issue, title: 'Feature1', description: 'Feature submitted for issue1', project: project) + create(:issue, title: 'Feature1', description: 'Feature submitted for issue1', project: project) end step 'I fill in issue search with \'Description for issue1\'' do diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 0e724138a8a..1ffd5cb9de5 100644 --- a/features/steps/project/redirects.rb +++ b/features/steps/project/redirects.rb @@ -39,7 +39,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps step 'Authenticate' do admin = create(:admin) - project = Project.find_by(name: 'Community') fill_in "user_login", with: admin.email fill_in "user_password", with: admin.password click_button "Sign in" @@ -54,7 +53,6 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps step 'I get redirected to signin page where I sign in' do admin = create(:admin) - project = Project.find_by(name: 'Enterprise') fill_in "user_login", with: admin.email fill_in "user_password", with: admin.password click_button "Sign in" diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb index 2d17fb34ccb..83a04576973 100644 --- a/features/steps/shared/group.rb +++ b/features/steps/shared/group.rb @@ -37,7 +37,7 @@ module SharedGroup group = Group.find_by(name: groupname) || create(:group, name: groupname) group.add_user(user, role) project ||= create(:project, namespace: group, path: "project#{@project_count}") - event ||= create(:closed_issue_event, project: project) + create(:closed_issue_event, project: project) project.team << [user, :master] @project_count += 1 end |