summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-03 14:38:35 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-06 10:04:04 +0100
commit53fcede5c0837eb53dcf67a9abf7d7b779bd1e25 (patch)
tree16aa08e81ee7f7dfd41bf1c2c8ba89ec303db551
parentac5bd3b73c0255bb9307913a2d4338d0a431cac6 (diff)
downloadgitlab-ce-53fcede5c0837eb53dcf67a9abf7d7b779bd1e25.tar.gz
Fix Rubocop offenses in pipeline processing specs
-rw-r--r--spec/services/ci/process_pipeline_service_spec.rb64
1 files changed, 32 insertions, 32 deletions
diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb
index b38feaca69b..b0cd3aac83b 100644
--- a/spec/services/ci/process_pipeline_service_spec.rb
+++ b/spec/services/ci/process_pipeline_service_spec.rb
@@ -61,7 +61,7 @@ describe Ci::ProcessPipelineService, '#execute', :services do
fail_running_or_pending
- expect(builds_statuses).to eq ['failed', 'pending']
+ expect(builds_statuses).to eq %w(failed pending)
end
end
@@ -84,22 +84,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test']
- expect(builds_statuses).to eq ['success', 'pending']
+ expect(builds_names).to eq %w(build test)
+ expect(builds_statuses).to eq %w(success pending)
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'deploy']
- expect(builds_statuses).to eq ['success', 'success', 'pending']
+ expect(builds_names).to eq %w(build test deploy)
+ expect(builds_statuses).to eq %w(success success pending)
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'deploy', 'cleanup']
- expect(builds_statuses).to eq ['success', 'success', 'success', 'pending']
+ expect(builds_names).to eq %w(build test deploy cleanup)
+ expect(builds_statuses).to eq %w(success success success pending)
succeed_running_or_pending
- expect(builds_statuses).to eq ['success', 'success', 'success', 'success']
+ expect(builds_statuses).to eq %w(success success success success)
expect(pipeline.reload.status).to eq 'success'
end
end
@@ -112,22 +112,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test']
- expect(builds_statuses).to eq ['success', 'pending']
+ expect(builds_names).to eq %w(build test)
+ expect(builds_statuses).to eq %w(success pending)
fail_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'test_failure']
- expect(builds_statuses).to eq ['success', 'failed', 'pending']
+ expect(builds_names).to eq %w(build test test_failure)
+ expect(builds_statuses).to eq %w(success failed pending)
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup']
- expect(builds_statuses).to eq ['success', 'failed', 'success', 'pending']
+ expect(builds_names).to eq %w(build test test_failure cleanup)
+ expect(builds_statuses).to eq %w(success failed success pending)
succeed_running_or_pending
- expect(builds_statuses).to eq ['success', 'failed', 'success', 'success']
+ expect(builds_statuses).to eq %w(success failed success success)
expect(pipeline.reload.status).to eq 'failed'
end
end
@@ -140,23 +140,23 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test']
- expect(builds_statuses).to eq ['success', 'pending']
+ expect(builds_names).to eq %w(build test)
+ expect(builds_statuses).to eq %w(success pending)
fail_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'test_failure']
- expect(builds_statuses).to eq ['success', 'failed', 'pending']
+ expect(builds_names).to eq %w(build test test_failure)
+ expect(builds_statuses).to eq %w(success failed pending)
fail_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup']
- expect(builds_statuses).to eq ['success', 'failed', 'failed', 'pending']
+ expect(builds_names).to eq %w(build test test_failure cleanup)
+ expect(builds_statuses).to eq %w(success failed failed pending)
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'test_failure', 'cleanup']
- expect(builds_statuses).to eq ['success', 'failed', 'failed', 'success']
+ expect(builds_names).to eq %w(build test test_failure cleanup)
+ expect(builds_statuses).to eq %w(success failed failed success)
expect(pipeline.reload.status).to eq('failed')
end
end
@@ -169,22 +169,22 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test']
- expect(builds_statuses).to eq ['success', 'pending']
+ expect(builds_names).to eq %w(build test)
+ expect(builds_statuses).to eq %w(success pending)
succeed_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'deploy']
- expect(builds_statuses).to eq ['success', 'success', 'pending']
+ expect(builds_names).to eq %w(build test deploy)
+ expect(builds_statuses).to eq %w(success success pending)
fail_running_or_pending
- expect(builds_names).to eq ['build', 'test', 'deploy', 'cleanup']
- expect(builds_statuses).to eq ['success', 'success', 'failed', 'pending']
+ expect(builds_names).to eq %w(build test deploy cleanup)
+ expect(builds_statuses).to eq %w(success success failed pending)
succeed_running_or_pending
- expect(builds_statuses).to eq ['success', 'success', 'failed', 'success']
+ expect(builds_statuses).to eq %w(success success failed success)
expect(pipeline.reload.status).to eq('failed')
end
end
@@ -198,8 +198,8 @@ describe Ci::ProcessPipelineService, '#execute', :services do
succeed_running_or_pending
expect(builds.running_or_pending).not_to be_empty
- expect(builds_names).to eq ['build', 'test']
- expect(builds_statuses).to eq ['success', 'pending']
+ expect(builds_names).to eq %w(build test)
+ expect(builds_statuses).to eq %w(success pending)
cancel_running_or_pending