Skip to content
Snippets Groups Projects
Commit 7d4b52b2 authored by Douwe Maan's avatar Douwe Maan
Browse files

Enable Style/WordArray

parent eacae005
No related branches found
No related tags found
No related merge requests found
Loading
@@ -21,11 +21,10 @@ describe API::V3::Labels, api: true do
Loading
@@ -21,11 +21,10 @@ describe API::V3::Labels, api: true do
create(:labeled_issue, project: project, labels: [label1], author: user, state: :closed) create(:labeled_issue, project: project, labels: [label1], author: user, state: :closed)
create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project ) create(:labeled_merge_request, labels: [priority_label], author: user, source_project: project )
   
expected_keys = [ expected_keys = %w(
'id', 'name', 'color', 'description', id name color description
'open_issues_count', 'closed_issues_count', 'open_merge_requests_count', open_issues_count closed_issues_count open_merge_requests_count
'subscribed', 'priority' subscribed priority)
]
   
get v3_api("/projects/#{project.id}/labels", user) get v3_api("/projects/#{project.id}/labels", user)
   
Loading
Loading
Loading
@@ -237,7 +237,7 @@ describe API::MergeRequests, api: true do
Loading
@@ -237,7 +237,7 @@ describe API::MergeRequests, api: true do
   
expect(response).to have_http_status(201) expect(response).to have_http_status(201)
expect(json_response['title']).to eq('Test merge_request') expect(json_response['title']).to eq('Test merge_request')
expect(json_response['labels']).to eq(['label', 'label2']) expect(json_response['labels']).to eq(%w(label label2))
expect(json_response['milestone']['id']).to eq(milestone.id) expect(json_response['milestone']['id']).to eq(milestone.id)
expect(json_response['force_remove_source_branch']).to be_truthy expect(json_response['force_remove_source_branch']).to be_truthy
end end
Loading
Loading
Loading
@@ -84,7 +84,7 @@ describe API::V3::Projects, api: true do
Loading
@@ -84,7 +84,7 @@ describe API::V3::Projects, api: true do
   
context 'GET /projects?simple=true' do context 'GET /projects?simple=true' do
it 'returns a simplified version of all the projects' do it 'returns a simplified version of all the projects' do
expected_keys = ["id", "http_url_to_repo", "web_url", "name", "name_with_namespace", "path", "path_with_namespace"] expected_keys = %w(id http_url_to_repo web_url name name_with_namespace path path_with_namespace)
   
get v3_api('/projects?simple=true', user) get v3_api('/projects?simple=true', user)
   
Loading
Loading
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Ci::API::Builds do describe Ci::API::Builds do
include ApiHelpers include ApiHelpers
   
let(:runner) { FactoryGirl.create(:ci_runner, tag_list: ["mysql", "ruby"]) } let(:runner) { FactoryGirl.create(:ci_runner, tag_list: %w(mysql ruby)) }
let(:project) { FactoryGirl.create(:empty_project, shared_runners_enabled: false) } let(:project) { FactoryGirl.create(:empty_project, shared_runners_enabled: false) }
let(:last_update) { nil } let(:last_update) { nil }
   
Loading
Loading
Loading
@@ -41,7 +41,7 @@ describe Ci::API::Runners do
Loading
@@ -41,7 +41,7 @@ describe Ci::API::Runners do
   
it 'creates runner' do it 'creates runner' do
expect(response).to have_http_status 201 expect(response).to have_http_status 201
expect(Ci::Runner.first.tag_list.sort).to eq(["tag1", "tag2"]) expect(Ci::Runner.first.tag_list.sort).to eq(%w(tag1 tag2))
end end
end end
   
Loading
Loading
Loading
@@ -72,7 +72,7 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
Loading
@@ -72,7 +72,7 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
   
shared_examples 'a pullable and pushable' do shared_examples 'a pullable and pushable' do
it_behaves_like 'a accessible' do it_behaves_like 'a accessible' do
let(:actions) { ['pull', 'push'] } let(:actions) { %w(pull push) }
end end
end end
   
Loading
Loading
Loading
@@ -59,8 +59,8 @@ describe MergeRequests::ResolveService do
Loading
@@ -59,8 +59,8 @@ describe MergeRequests::ResolveService do
   
it 'creates a commit with the correct parents' do it 'creates a commit with the correct parents' do
expect(merge_request.source_branch_head.parents.map(&:id)) expect(merge_request.source_branch_head.parents.map(&:id))
.to eq(['1450cd639e0bc6721eb02800169e464f212cde06', .to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06
'824be604a34828eb682305f0d963056cfac87b2d']) 824be604a34828eb682305f0d963056cfac87b2d))
end end
end end
   
Loading
@@ -125,8 +125,8 @@ describe MergeRequests::ResolveService do
Loading
@@ -125,8 +125,8 @@ describe MergeRequests::ResolveService do
   
it 'creates a commit with the correct parents' do it 'creates a commit with the correct parents' do
expect(merge_request.source_branch_head.parents.map(&:id)) expect(merge_request.source_branch_head.parents.map(&:id))
.to eq(['1450cd639e0bc6721eb02800169e464f212cde06', .to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06
'824be604a34828eb682305f0d963056cfac87b2d']) 824be604a34828eb682305f0d963056cfac87b2d))
end end
   
it 'sets the content to the content given' do it 'sets the content to the content given' do
Loading
Loading
Loading
@@ -631,7 +631,7 @@ describe SystemNoteService, services: true do
Loading
@@ -631,7 +631,7 @@ describe SystemNoteService, services: true do
jira_service_settings jira_service_settings
end end
   
noteable_types = ["merge_requests", "commit"] noteable_types = %w(merge_requests commit)
   
noteable_types.each do |type| noteable_types.each do |type|
context "when noteable is a #{type}" do context "when noteable is a #{type}" do
Loading
Loading
Loading
@@ -100,13 +100,12 @@ eos
Loading
@@ -100,13 +100,12 @@ eos
} }
] ]
   
commits = [ commits = %w(
'5937ac0a7beb003549fc5fd26fc247adbce4a52e', 5937ac0a7beb003549fc5fd26fc247adbce4a52e
'570e7b2abdd848b95f2f578043fc23bd6f6fd24d', 570e7b2abdd848b95f2f578043fc23bd6f6fd24d
'6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9', 6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9
'd14d6c0abdd253381df51a723d58691b2ee1ab08', d14d6c0abdd253381df51a723d58691b2ee1ab08
'c1acaa58bbcbc3eafe538cb8274ba387047b69f8', c1acaa58bbcbc3eafe538cb8274ba387047b69f8).reverse # last commit is recent one
].reverse # last commit is recent one
   
OpenStruct.new( OpenStruct.new(
source_branch: 'master', source_branch: 'master',
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment