From b40d5d0fbb4d61ab8d5ee393eb91a395fb70b236 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 22 Mar 2018 15:22:50 +0100 Subject: Fix static analysis and tests related to YAML processing --- spec/lib/gitlab/ci/pipeline/seed/build_spec.rb | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'spec/lib/gitlab/ci/pipeline/seed/build_spec.rb') 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| -- cgit v1.2.1