summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-22 15:22:50 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-22 15:22:50 +0100
commitb40d5d0fbb4d61ab8d5ee393eb91a395fb70b236 (patch)
treed67c997340c598f363a60a19da6fd3c22a0f03e4 /spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
parentb9e329769e4bcc688133a763ea85318abb88aaaa (diff)
downloadgitlab-ce-b40d5d0fbb4d61ab8d5ee393eb91a395fb70b236.tar.gz
Fix static analysis and tests related to YAML processing
Diffstat (limited to 'spec/lib/gitlab/ci/pipeline/seed/build_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/pipeline/seed/build_spec.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
index 94ead73e875..116573379e0 100644
--- a/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
+++ b/spec/lib/gitlab/ci/pipeline/seed/build_spec.rb
@@ -89,13 +89,13 @@ describe Gitlab::Ci::Pipeline::Seed::Build do
context 'when branch policy matches' do
context 'when using only' do
- let(:attributes) { { name: 'rspec', only: { refs: ['deploy', 'master'] } } }
+ let(:attributes) { { name: 'rspec', only: { refs: %w[deploy master] } } }
it { is_expected.to be_included }
end
context 'when using except' do
- let(:attributes) { { name: 'rspec', except: { refs: ['deploy', 'master'] } } }
+ let(:attributes) { { name: 'rspec', except: { refs: %w[deploy master] } } }
it { is_expected.not_to be_included }
end
@@ -130,12 +130,12 @@ describe Gitlab::Ci::Pipeline::Seed::Build do
end
context 'when keywords and pipeline source policy matches' do
- possibilities = [['pushes', 'push'],
- ['web', 'web'],
- ['triggers', 'trigger'],
- ['schedules', 'schedule'],
- ['api', 'api'],
- ['external', 'external']]
+ possibilities = [%w[pushes push],
+ %w[web web],
+ %w[triggers trigger],
+ %w[schedules schedule],
+ %w[api api],
+ %w[external external]]
context 'when using only' do
possibilities.each do |keyword, source|
@@ -167,12 +167,12 @@ describe Gitlab::Ci::Pipeline::Seed::Build do
end
context 'when keywords and pipeline source does not match' do
- possibilities = [['pushes', 'web'],
- ['web', 'push'],
- ['triggers', 'schedule'],
- ['schedules', 'external'],
- ['api', 'trigger'],
- ['external', 'api']]
+ possibilities = [%w[pushes web],
+ %w[web push],
+ %w[triggers schedule],
+ %w[schedules external],
+ %w[api trigger],
+ %w[external api]]
context 'when using only' do
possibilities.each do |keyword, source|