summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 16:50:15 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:33:05 -0600
commit1fe7501b49f896b74102c4b970310aa9ae34da85 (patch)
treece271afb0fbaaa14291c1dc9009cd7815ee25463 /spec/lib/gitlab/ci/config
parentbdbc7d967a0c3d95d5e4ea19a2a5be41268d3540 (diff)
downloadgitlab-ce-1fe7501b49f896b74102c4b970310aa9ae34da85.tar.gz
Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
Diffstat (limited to 'spec/lib/gitlab/ci/config')
-rw-r--r--spec/lib/gitlab/ci/config/entry/artifacts_spec.rb8
-rw-r--r--spec/lib/gitlab/ci/config/entry/attributable_spec.rb12
-rw-r--r--spec/lib/gitlab/ci/config/entry/boolean_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/cache_spec.rb12
-rw-r--r--spec/lib/gitlab/ci/config/entry/commands_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/configurable_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/environment_spec.rb16
-rw-r--r--spec/lib/gitlab/ci/config/entry/factory_spec.rb52
-rw-r--r--spec/lib/gitlab/ci/config/entry/global_spec.rb48
-rw-r--r--spec/lib/gitlab/ci/config/entry/image_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/job_spec.rb18
-rw-r--r--spec/lib/gitlab/ci/config/entry/jobs_spec.rb16
-rw-r--r--spec/lib/gitlab/ci/config/entry/key_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/paths_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/script_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/services_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/stage_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/stages_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/trigger_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/validatable_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/validator_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/variables_spec.rb4
22 files changed, 119 insertions, 119 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb b/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
index 5c31423fdee..987a0b1f67f 100644
--- a/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb
@@ -26,8 +26,8 @@ describe Gitlab::Ci::Config::Entry::Artifacts do
let(:config) { { name: 10 } }
it 'reports error' do
- expect(entry.errors)
- .to include 'artifacts name should be a string'
+ expect(entry.errors).
+ to include 'artifacts name should be a string'
end
end
@@ -35,8 +35,8 @@ describe Gitlab::Ci::Config::Entry::Artifacts do
let(:config) { { test: 100 } }
it 'reports error' do
- expect(entry.errors)
- .to include 'artifacts config contains unknown keys: test'
+ expect(entry.errors).
+ to include 'artifacts config contains unknown keys: test'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/attributable_spec.rb b/spec/lib/gitlab/ci/config/entry/attributable_spec.rb
index fde03c51e2c..efb8c5adab1 100644
--- a/spec/lib/gitlab/ci/config/entry/attributable_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/attributable_spec.rb
@@ -14,9 +14,9 @@ describe Gitlab::Ci::Config::Entry::Attributable do
context 'config is a hash' do
before do
- allow(instance)
- .to receive(:config)
- .and_return({ name: 'some name', test: 'some test' })
+ allow(instance).
+ to receive(:config).
+ and_return({ name: 'some name', test: 'some test' })
end
it 'returns the value of config' do
@@ -31,9 +31,9 @@ describe Gitlab::Ci::Config::Entry::Attributable do
context 'config is not a hash' do
before do
- allow(instance)
- .to receive(:config)
- .and_return('some test')
+ allow(instance).
+ to receive(:config).
+ and_return('some test')
end
it 'returns nil' do
diff --git a/spec/lib/gitlab/ci/config/entry/boolean_spec.rb b/spec/lib/gitlab/ci/config/entry/boolean_spec.rb
index 5f067cad93c..8987c0549c5 100644
--- a/spec/lib/gitlab/ci/config/entry/boolean_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/boolean_spec.rb
@@ -25,8 +25,8 @@ describe Gitlab::Ci::Config::Entry::Boolean do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'boolean config should be a boolean value'
+ expect(entry.errors).
+ to include 'boolean config should be a boolean value'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/cache_spec.rb b/spec/lib/gitlab/ci/config/entry/cache_spec.rb
index 70a327c5183..e91f049ee72 100644
--- a/spec/lib/gitlab/ci/config/entry/cache_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/cache_spec.rb
@@ -32,8 +32,8 @@ describe Gitlab::Ci::Config::Entry::Cache do
let(:config) { 'ls' }
it 'reports errors with config value' do
- expect(entry.errors)
- .to include 'cache config should be a hash'
+ expect(entry.errors).
+ to include 'cache config should be a hash'
end
end
@@ -41,8 +41,8 @@ describe Gitlab::Ci::Config::Entry::Cache do
let(:config) { { key: 1 } }
it 'reports error with descendants' do
- expect(entry.errors)
- .to include 'key config should be a string or symbol'
+ expect(entry.errors).
+ to include 'key config should be a string or symbol'
end
end
@@ -50,8 +50,8 @@ describe Gitlab::Ci::Config::Entry::Cache do
let(:config) { { invalid: true } }
it 'reports error with descendants' do
- expect(entry.errors)
- .to include 'cache config contains unknown keys: invalid'
+ expect(entry.errors).
+ to include 'cache config contains unknown keys: invalid'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/commands_spec.rb b/spec/lib/gitlab/ci/config/entry/commands_spec.rb
index afa4a089418..8fe82bc2ebd 100644
--- a/spec/lib/gitlab/ci/config/entry/commands_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/commands_spec.rb
@@ -40,8 +40,8 @@ describe Gitlab::Ci::Config::Entry::Commands do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'commands config should be a ' \
+ expect(entry.errors).
+ to include 'commands config should be a ' \
'string or an array of strings'
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/configurable_spec.rb b/spec/lib/gitlab/ci/config/entry/configurable_spec.rb
index ae7e628b5b5..490ba9b7df1 100644
--- a/spec/lib/gitlab/ci/config/entry/configurable_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/configurable_spec.rb
@@ -52,8 +52,8 @@ describe Gitlab::Ci::Config::Entry::Configurable do
end
it 'creates a node factory' do
- expect(entry.nodes[:object])
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Factory
+ expect(entry.nodes[:object]).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Factory
end
it 'returns a duplicated factory object' do
diff --git a/spec/lib/gitlab/ci/config/entry/environment_spec.rb b/spec/lib/gitlab/ci/config/entry/environment_spec.rb
index 2adbed2154f..fab2825fbb0 100644
--- a/spec/lib/gitlab/ci/config/entry/environment_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/environment_spec.rb
@@ -112,8 +112,8 @@ describe Gitlab::Ci::Config::Entry::Environment do
describe '#errors' do
it 'contains error about invalid action' do
- expect(entry.errors)
- .to include 'environment action should be start or stop'
+ expect(entry.errors).
+ to include 'environment action should be start or stop'
end
end
end
@@ -143,8 +143,8 @@ describe Gitlab::Ci::Config::Entry::Environment do
describe '#errors' do
it 'contains error about invalid action' do
- expect(entry.errors)
- .to include 'environment on stop should be a string'
+ expect(entry.errors).
+ to include 'environment on stop should be a string'
end
end
end
@@ -174,8 +174,8 @@ describe Gitlab::Ci::Config::Entry::Environment do
describe '#errors' do
it 'contains error about invalid type' do
- expect(entry.errors)
- .to include 'environment config should be a hash or a string'
+ expect(entry.errors).
+ to include 'environment config should be a hash or a string'
end
end
end
@@ -191,8 +191,8 @@ describe Gitlab::Ci::Config::Entry::Environment do
describe '#errors?' do
it 'contains error about missing environment name' do
- expect(entry.errors)
- .to include "environment name can't be blank"
+ expect(entry.errors).
+ to include "environment name can't be blank"
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/factory_spec.rb b/spec/lib/gitlab/ci/config/entry/factory_spec.rb
index 3395b3c645b..5c5ce2d6f39 100644
--- a/spec/lib/gitlab/ci/config/entry/factory_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/factory_spec.rb
@@ -7,19 +7,19 @@ describe Gitlab::Ci::Config::Entry::Factory do
context 'when setting a concrete value' do
it 'creates entry with valid value' do
- entry = factory
- .value(%w(ls pwd))
- .create!
+ entry = factory.
+ value(%w(ls pwd)).
+ create!
expect(entry.value).to eq %w(ls pwd)
end
context 'when setting description' do
it 'creates entry with description' do
- entry = factory
- .value(%w(ls pwd))
- .with(description: 'test description')
- .create!
+ entry = factory.
+ value(%w(ls pwd)).
+ with(description: 'test description').
+ create!
expect(entry.value).to eq %w(ls pwd)
expect(entry.description).to eq 'test description'
@@ -28,10 +28,10 @@ describe Gitlab::Ci::Config::Entry::Factory do
context 'when setting key' do
it 'creates entry with custom key' do
- entry = factory
- .value(%w(ls pwd))
- .with(key: 'test key')
- .create!
+ entry = factory.
+ value(%w(ls pwd)).
+ with(key: 'test key').
+ create!
expect(entry.key).to eq 'test key'
end
@@ -41,10 +41,10 @@ describe Gitlab::Ci::Config::Entry::Factory do
let(:object) { Object.new }
it 'creates entry with valid parent' do
- entry = factory
- .value('ls')
- .with(parent: object)
- .create!
+ entry = factory.
+ value('ls').
+ with(parent: object).
+ create!
expect(entry.parent).to eq object
end
@@ -61,12 +61,12 @@ describe Gitlab::Ci::Config::Entry::Factory do
context 'when creating entry with nil value' do
it 'creates an undefined entry' do
- entry = factory
- .value(nil)
- .create!
+ entry = factory.
+ value(nil).
+ create!
- expect(entry)
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Unspecified
+ expect(entry).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Unspecified
end
end
@@ -74,13 +74,13 @@ describe Gitlab::Ci::Config::Entry::Factory do
let(:entry) { spy('entry') }
it 'passes metadata as a parameter' do
- factory
- .value('some value')
- .metadata(some: 'hash')
- .create!
+ factory.
+ value('some value').
+ metadata(some: 'hash').
+ create!
- expect(entry).to have_received(:new)
- .with('some value', { some: 'hash' })
+ expect(entry).to have_received(:new).
+ with('some value', { some: 'hash' })
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/global_spec.rb b/spec/lib/gitlab/ci/config/entry/global_spec.rb
index ebd80ac5e1d..67a6b3cc98d 100644
--- a/spec/lib/gitlab/ci/config/entry/global_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/global_spec.rb
@@ -10,10 +10,10 @@ describe Gitlab::Ci::Config::Entry::Global do
context 'when filtering all the entry/node names' do
it 'contains the expected node names' do
- expect(described_class.nodes.keys)
- .to match_array(%i[before_script image services
- after_script variables stages
- types cache])
+ expect(described_class.nodes.keys).
+ to match_array(%i[before_script image services
+ after_script variables stages
+ types cache])
end
end
end
@@ -44,17 +44,17 @@ describe Gitlab::Ci::Config::Entry::Global do
end
it 'creates node object using valid class' do
- expect(global.descendants.first)
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Script
- expect(global.descendants.second)
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Image
+ expect(global.descendants.first).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Script
+ expect(global.descendants.second).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Image
end
it 'sets correct description for nodes' do
- expect(global.descendants.first.description)
- .to eq 'Script that will be executed before each job.'
- expect(global.descendants.second.description)
- .to eq 'Docker image that will be used to execute jobs.'
+ expect(global.descendants.first.description).
+ to eq 'Script that will be executed before each job.'
+ expect(global.descendants.second.description).
+ to eq 'Docker image that will be used to execute jobs.'
end
describe '#leaf?' do
@@ -138,8 +138,8 @@ describe Gitlab::Ci::Config::Entry::Global do
describe '#cache_value' do
it 'returns cache configuration' do
- expect(global.cache_value)
- .to eq(key: 'k', untracked: true, paths: ['public/'])
+ expect(global.cache_value).
+ to eq(key: 'k', untracked: true, paths: ['public/'])
end
end
@@ -185,8 +185,8 @@ describe Gitlab::Ci::Config::Entry::Global do
end
it 'contains unspecified nodes' do
- expect(global.descendants.first)
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Unspecified
+ expect(global.descendants.first).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Unspecified
end
end
@@ -246,8 +246,8 @@ describe Gitlab::Ci::Config::Entry::Global do
describe '#errors' do
it 'reports errors from child nodes' do
- expect(global.errors)
- .to include 'before_script config should be an array of strings'
+ expect(global.errors).
+ to include 'before_script config should be an array of strings'
end
end
@@ -265,8 +265,8 @@ describe Gitlab::Ci::Config::Entry::Global do
describe '#errors' do
it 'reports errors about missing script' do
- expect(global.errors)
- .to include "jobs:rspec script can't be blank"
+ expect(global.errors).
+ to include "jobs:rspec script can't be blank"
end
end
end
@@ -303,16 +303,16 @@ describe Gitlab::Ci::Config::Entry::Global do
context 'when entry exists' do
it 'returns correct entry' do
- expect(global[:cache])
- .to be_an_instance_of Gitlab::Ci::Config::Entry::Cache
+ expect(global[:cache]).
+ to be_an_instance_of Gitlab::Ci::Config::Entry::Cache
expect(global[:jobs][:rspec][:script].value).to eq ['ls']
end
end
context 'when entry does not exist' do
it 'always return unspecified node' do
- expect(global[:some][:unknown][:node])
- .not_to be_specified
+ expect(global[:some][:unknown][:node]).
+ not_to be_specified
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/image_spec.rb b/spec/lib/gitlab/ci/config/entry/image_spec.rb
index 3c99cb0a1ee..062817e07fd 100644
--- a/spec/lib/gitlab/ci/config/entry/image_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/image_spec.rb
@@ -31,8 +31,8 @@ describe Gitlab::Ci::Config::Entry::Image do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'image config should be a string'
+ expect(entry.errors).
+ to include 'image config should be a string'
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/job_spec.rb b/spec/lib/gitlab/ci/config/entry/job_spec.rb
index d20f4ec207d..82feff0af1c 100644
--- a/spec/lib/gitlab/ci/config/entry/job_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/job_spec.rb
@@ -44,8 +44,8 @@ describe Gitlab::Ci::Config::Entry::Job do
describe '#errors' do
it 'reports error about a config type' do
- expect(entry.errors)
- .to include 'job config should be a hash'
+ expect(entry.errors).
+ to include 'job config should be a hash'
end
end
end
@@ -138,13 +138,13 @@ describe Gitlab::Ci::Config::Entry::Job do
end
it 'returns correct value' do
- expect(entry.value)
- .to eq(name: :rspec,
- before_script: %w[ls pwd],
- script: %w[rspec],
- commands: "ls\npwd\nrspec",
- stage: 'test',
- after_script: %w[cleanup])
+ expect(entry.value).
+ to eq(name: :rspec,
+ before_script: %w[ls pwd],
+ script: %w[rspec],
+ commands: "ls\npwd\nrspec",
+ stage: 'test',
+ after_script: %w[cleanup])
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/jobs_spec.rb b/spec/lib/gitlab/ci/config/entry/jobs_spec.rb
index aaebf783962..c332b70dc71 100644
--- a/spec/lib/gitlab/ci/config/entry/jobs_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/jobs_spec.rb
@@ -22,8 +22,8 @@ describe Gitlab::Ci::Config::Entry::Jobs do
let(:config) { ['incorrect'] }
it 'returns error about incorrect type' do
- expect(entry.errors)
- .to include 'jobs config should be a hash'
+ expect(entry.errors).
+ to include 'jobs config should be a hash'
end
end
@@ -39,8 +39,8 @@ describe Gitlab::Ci::Config::Entry::Jobs do
let(:config) { { '.hidden'.to_sym => { script: [] } } }
it 'returns error about no visible jobs defined' do
- expect(entry.errors)
- .to include 'jobs config should contain at least one visible job'
+ expect(entry.errors).
+ to include 'jobs config should contain at least one visible job'
end
end
end
@@ -73,10 +73,10 @@ describe Gitlab::Ci::Config::Entry::Jobs do
describe '#descendants' do
it 'creates valid descendant nodes' do
expect(entry.descendants.count).to eq 3
- expect(entry.descendants.first(2))
- .to all(be_an_instance_of(Gitlab::Ci::Config::Entry::Job))
- expect(entry.descendants.last)
- .to be_an_instance_of(Gitlab::Ci::Config::Entry::Hidden)
+ expect(entry.descendants.first(2)).
+ to all(be_an_instance_of(Gitlab::Ci::Config::Entry::Job))
+ expect(entry.descendants.last).
+ to be_an_instance_of(Gitlab::Ci::Config::Entry::Hidden)
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/key_spec.rb b/spec/lib/gitlab/ci/config/entry/key_spec.rb
index 0dd36fe1f44..cd7b03ffb11 100644
--- a/spec/lib/gitlab/ci/config/entry/key_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/key_spec.rb
@@ -25,8 +25,8 @@ describe Gitlab::Ci::Config::Entry::Key do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'key config should be a string or symbol'
+ expect(entry.errors).
+ to include 'key config should be a string or symbol'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/paths_spec.rb b/spec/lib/gitlab/ci/config/entry/paths_spec.rb
index 1d9c5ddee9b..b0ac90f1d94 100644
--- a/spec/lib/gitlab/ci/config/entry/paths_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/paths_spec.rb
@@ -25,8 +25,8 @@ describe Gitlab::Ci::Config::Entry::Paths do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'paths config should be an array of strings'
+ expect(entry.errors).
+ to include 'paths config should be an array of strings'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/script_spec.rb b/spec/lib/gitlab/ci/config/entry/script_spec.rb
index 069eaa26422..49cca49509c 100644
--- a/spec/lib/gitlab/ci/config/entry/script_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/script_spec.rb
@@ -31,8 +31,8 @@ describe Gitlab::Ci::Config::Entry::Script do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'script config should be an array of strings'
+ expect(entry.errors).
+ to include 'script config should be an array of strings'
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/services_spec.rb b/spec/lib/gitlab/ci/config/entry/services_spec.rb
index 66fad3b6b16..c31a7c0ec3e 100644
--- a/spec/lib/gitlab/ci/config/entry/services_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/services_spec.rb
@@ -25,8 +25,8 @@ describe Gitlab::Ci::Config::Entry::Services do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'services config should be an array of strings'
+ expect(entry.errors).
+ to include 'services config should be an array of strings'
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/stage_spec.rb b/spec/lib/gitlab/ci/config/entry/stage_spec.rb
index 70c8a0a355a..cefef7a805a 100644
--- a/spec/lib/gitlab/ci/config/entry/stage_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/stage_spec.rb
@@ -24,8 +24,8 @@ describe Gitlab::Ci::Config::Entry::Stage do
let(:config) { { test: true } }
it 'reports errors about wrong type' do
- expect(stage.errors)
- .to include 'stage config should be a string'
+ expect(stage.errors).
+ to include 'stage config should be a string'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/stages_spec.rb b/spec/lib/gitlab/ci/config/entry/stages_spec.rb
index 182c8d867c7..bdcd6c98a85 100644
--- a/spec/lib/gitlab/ci/config/entry/stages_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/stages_spec.rb
@@ -25,8 +25,8 @@ describe Gitlab::Ci::Config::Entry::Stages do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'stages config should be an array of strings'
+ expect(entry.errors).
+ to include 'stages config should be an array of strings'
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb b/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
index e4ee44f1274..13b00a98b6a 100644
--- a/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/trigger_spec.rb
@@ -47,8 +47,8 @@ describe Gitlab::Ci::Config::Entry::Trigger do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include 'trigger config should be an array of strings or regexps'
+ expect(entry.errors).
+ to include 'trigger config should be an array of strings or regexps'
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/validatable_spec.rb b/spec/lib/gitlab/ci/config/entry/validatable_spec.rb
index d1856801827..e31e85538b9 100644
--- a/spec/lib/gitlab/ci/config/entry/validatable_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/validatable_spec.rb
@@ -19,8 +19,8 @@ describe Gitlab::Ci::Config::Entry::Validatable do
end
it 'returns validator' do
- expect(entry.validator.superclass)
- .to be Gitlab::Ci::Config::Entry::Validator
+ expect(entry.validator.superclass).
+ to be Gitlab::Ci::Config::Entry::Validator
end
it 'returns only one validator to mitigate leaks' do
diff --git a/spec/lib/gitlab/ci/config/entry/validator_spec.rb b/spec/lib/gitlab/ci/config/entry/validator_spec.rb
index ad7e6f07d3c..c6e21cd67b0 100644
--- a/spec/lib/gitlab/ci/config/entry/validator_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/validator_spec.rb
@@ -47,8 +47,8 @@ describe Gitlab::Ci::Config::Entry::Validator do
it 'returns errors' do
validator_instance.validate
- expect(validator_instance.messages)
- .to include "node test attribute can't be blank"
+ expect(validator_instance.messages).
+ to include "node test attribute can't be blank"
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/variables_spec.rb b/spec/lib/gitlab/ci/config/entry/variables_spec.rb
index f15f02f403e..c117f35c906 100644
--- a/spec/lib/gitlab/ci/config/entry/variables_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/variables_spec.rb
@@ -33,8 +33,8 @@ describe Gitlab::Ci::Config::Entry::Variables do
describe '#errors' do
it 'saves errors' do
- expect(entry.errors)
- .to include /should be a hash of key value pairs/
+ expect(entry.errors).
+ to include /should be a hash of key value pairs/
end
end