Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 02:29:35 +0300
committerDouwe Maan <douwe@selenight.nl>2017-02-23 18:31:56 +0300
commit3dadf306ddc81183e74b048bc4119796852ed7ea (patch)
treef01d5e7eb9c5550bc34a42d9e88479cd3fef578d /spec/lib
parent547063b3ac096dff25309b6e0846b0d5f417c128 (diff)
Enable Style/DotPosition
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/api/helpers/pagination_spec.rb12
-rw-r--r--spec/lib/banzai/filter/external_issue_reference_filter_spec.rb4
-rw-r--r--spec/lib/banzai/filter/label_reference_filter_spec.rb28
-rw-r--r--spec/lib/banzai/filter/user_reference_filter_spec.rb4
-rw-r--r--spec/lib/ci/gitlab_ci_yaml_processor_spec.rb20
-rw-r--r--spec/lib/gitlab/asciidoc_spec.rb8
-rw-r--r--spec/lib/gitlab/auth_spec.rb8
-rw-r--r--spec/lib/gitlab/backup/manager_spec.rb16
-rw-r--r--spec/lib/gitlab/badge/build/status_spec.rb4
-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.rb44
-rw-r--r--spec/lib/gitlab/ci/config/entry/image_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/job_spec.rb8
-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
-rw-r--r--spec/lib/gitlab/ci/status/build/common_spec.rb6
-rw-r--r--spec/lib/gitlab/ci/status/build/factory_spec.rb32
-rw-r--r--spec/lib/gitlab/ci/status/extended_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/status/external/common_spec.rb6
-rw-r--r--spec/lib/gitlab/ci/status/factory_spec.rb16
-rw-r--r--spec/lib/gitlab/ci/status/pipeline/common_spec.rb10
-rw-r--r--spec/lib/gitlab/ci/status/pipeline/factory_spec.rb8
-rw-r--r--spec/lib/gitlab/ci/status/stage/common_spec.rb12
-rw-r--r--spec/lib/gitlab/ci/status/stage/factory_spec.rb4
-rw-r--r--spec/lib/gitlab/data_builder/note_spec.rb36
-rw-r--r--spec/lib/gitlab/database_spec.rb4
-rw-r--r--spec/lib/gitlab/import_export/avatar_restorer_spec.rb4
-rw-r--r--spec/lib/gitlab/incoming_email_spec.rb4
-rw-r--r--spec/lib/gitlab/ldap/adapter_spec.rb4
-rw-r--r--spec/lib/gitlab/o_auth/user_spec.rb4
-rw-r--r--spec/lib/gitlab/serializer/pagination_spec.rb8
47 files changed, 245 insertions, 245 deletions
diff --git a/spec/lib/api/helpers/pagination_spec.rb b/spec/lib/api/helpers/pagination_spec.rb
index 267318faed4..152c36a3ae6 100644
--- a/spec/lib/api/helpers/pagination_spec.rb
+++ b/spec/lib/api/helpers/pagination_spec.rb
@@ -37,8 +37,8 @@ describe API::Helpers::Pagination do
describe 'first page' do
before do
- allow(subject).to receive(:params)
- .and_return({ page: 1, per_page: 2 })
+ allow(subject).to receive(:params).
+ and_return({ page: 1, per_page: 2 })
end
it 'returns appropriate amount of resources' do
@@ -60,8 +60,8 @@ describe API::Helpers::Pagination do
describe 'second page' do
before do
- allow(subject).to receive(:params)
- .and_return({ page: 2, per_page: 2 })
+ allow(subject).to receive(:params).
+ and_return({ page: 2, per_page: 2 })
end
it 'returns appropriate amount of resources' do
@@ -87,8 +87,8 @@ describe API::Helpers::Pagination do
end
def expect_message(method)
- expect(subject).to receive(method)
- .at_least(:once).and_return(value)
+ expect(subject).to receive(method).
+ at_least(:once).and_return(value)
end
end
end
diff --git a/spec/lib/banzai/filter/external_issue_reference_filter_spec.rb b/spec/lib/banzai/filter/external_issue_reference_filter_spec.rb
index fbf7a461fa5..efd145e9452 100644
--- a/spec/lib/banzai/filter/external_issue_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/external_issue_reference_filter_spec.rb
@@ -33,8 +33,8 @@ describe Banzai::Filter::ExternalIssueReferenceFilter, lib: true do
doc = filter("Issue #{reference}")
issue_id = doc.css('a').first.attr("data-external-issue")
- expect(doc.css('a').first.attr('href'))
- .to eq helper.url_for_issue(issue_id, project)
+ expect(doc.css('a').first.attr('href')).
+ to eq helper.url_for_issue(issue_id, project)
end
it 'links to the external tracker' do
diff --git a/spec/lib/banzai/filter/label_reference_filter_spec.rb b/spec/lib/banzai/filter/label_reference_filter_spec.rb
index 284641fb20a..5e16fd10ebe 100644
--- a/spec/lib/banzai/filter/label_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/label_reference_filter_spec.rb
@@ -372,8 +372,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}") }
it 'links to a valid reference' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(project2.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(project2.namespace,
project2,
label_name: label.name)
end
@@ -406,8 +406,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}") }
it 'links to a valid reference' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(project2.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(project2.namespace,
project2,
label_name: label.name)
end
@@ -440,8 +440,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}") }
it 'links to a valid reference' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(project2.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(project2.namespace,
project2,
label_name: label.name)
end
@@ -476,8 +476,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}", project: project) }
it 'points to referenced project issues page' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(another_project.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(another_project.namespace,
another_project,
label_name: group_label.name)
end
@@ -549,15 +549,15 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}", project: project) }
it 'points to referenced project issues page' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(project.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(project.namespace,
project,
label_name: group_label.name)
end
it 'has valid color' do
- expect(result.css('a span').first.attr('style'))
- .to match /background-color: #00ff00/
+ expect(result.css('a span').first.attr('style')).
+ to match /background-color: #00ff00/
end
it 'has valid link text' do
@@ -583,8 +583,8 @@ describe Banzai::Filter::LabelReferenceFilter, lib: true do
let!(:result) { reference_filter("See #{reference}", project: project) }
it 'points to referenced project issues page' do
- expect(result.css('a').first.attr('href'))
- .to eq urls.namespace_project_issues_url(project.namespace,
+ expect(result.css('a').first.attr('href')).
+ to eq urls.namespace_project_issues_url(project.namespace,
project,
label_name: group_label.name)
end
diff --git a/spec/lib/banzai/filter/user_reference_filter_spec.rb b/spec/lib/banzai/filter/user_reference_filter_spec.rb
index d5d128c1907..e9b7b566806 100644
--- a/spec/lib/banzai/filter/user_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/user_reference_filter_spec.rb
@@ -37,8 +37,8 @@ describe Banzai::Filter::UserReferenceFilter, lib: true do
doc = reference_filter("Hey #{reference}", author: user)
expect(doc.css('a').length).to eq 1
- expect(doc.css('a').first.attr('href'))
- .to eq urls.namespace_project_url(project.namespace, project)
+ expect(doc.css('a').first.attr('href')).
+ to eq urls.namespace_project_url(project.namespace, project)
end
it 'includes a data-author attribute when there is an author' do
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
index 68ad429608d..ce31f8a8432 100644
--- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
@@ -25,8 +25,8 @@ module Ci
end
it 'includes coverage regexp in build attributes' do
- expect(subject)
- .to include(coverage_regex: 'Code coverage: \d+\.\d+')
+ expect(subject).
+ to include(coverage_regex: 'Code coverage: \d+\.\d+')
end
end
end
@@ -584,8 +584,8 @@ module Ci
end
it 'raises error' do
- expect { subject }
- .to raise_error(GitlabCiYamlProcessor::ValidationError,
+ expect { subject }.
+ to raise_error(GitlabCiYamlProcessor::ValidationError,
/jobs:rspec:variables config should be a hash of key value pairs/)
end
end
@@ -1365,8 +1365,8 @@ EOT
it "returns an error about invalid configutaion" do
content = YAML.dump("invalid: yaml: test")
- expect(GitlabCiYamlProcessor.validation_message(content))
- .to eq "Invalid configuration format"
+ expect(GitlabCiYamlProcessor.validation_message(content)).
+ to eq "Invalid configuration format"
end
end
@@ -1374,15 +1374,15 @@ EOT
it "returns an error about invalid tags" do
content = YAML.dump({ rspec: { script: "test", tags: "mysql" } })
- expect(GitlabCiYamlProcessor.validation_message(content))
- .to eq "jobs:rspec tags should be an array of strings"
+ expect(GitlabCiYamlProcessor.validation_message(content)).
+ to eq "jobs:rspec tags should be an array of strings"
end
end
context "when YAML content is empty" do
it "returns an error about missing content" do
- expect(GitlabCiYamlProcessor.validation_message(''))
- .to eq "Please provide content of .gitlab-ci.yml"
+ expect(GitlabCiYamlProcessor.validation_message('')).
+ to eq "Please provide content of .gitlab-ci.yml"
end
end
diff --git a/spec/lib/gitlab/asciidoc_spec.rb b/spec/lib/gitlab/asciidoc_spec.rb
index bca57105d1d..e193a3b79a6 100644
--- a/spec/lib/gitlab/asciidoc_spec.rb
+++ b/spec/lib/gitlab/asciidoc_spec.rb
@@ -19,8 +19,8 @@ module Gitlab
attributes: described_class::DEFAULT_ADOC_ATTRS
}
- expect(Asciidoctor).to receive(:convert)
- .with(input, expected_asciidoc_opts).and_return(html)
+ expect(Asciidoctor).to receive(:convert).
+ with(input, expected_asciidoc_opts).and_return(html)
expect( render(input, context) ).to eql html
end
@@ -35,8 +35,8 @@ module Gitlab
attributes: described_class::DEFAULT_ADOC_ATTRS + ['foo']
}
- expect(Asciidoctor).to receive(:convert)
- .with(input, expected_asciidoc_opts).and_return(html)
+ expect(Asciidoctor).to receive(:convert).
+ with(input, expected_asciidoc_opts).and_return(html)
render(input, context, asciidoc_opts)
end
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index b234de4c772..57c416fb35a 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -140,8 +140,8 @@ describe Gitlab::Auth, lib: true do
password: 'my-secret',
)
- expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip'))
- .to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
+ expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip')).
+ to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
end
it 'falls through oauth authentication when the username is oauth2' do
@@ -151,8 +151,8 @@ describe Gitlab::Auth, lib: true do
password: 'my-secret',
)
- expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip'))
- .to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
+ expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip')).
+ to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
end
end
diff --git a/spec/lib/gitlab/backup/manager_spec.rb b/spec/lib/gitlab/backup/manager_spec.rb
index f84782ab440..e9c69183d00 100644
--- a/spec/lib/gitlab/backup/manager_spec.rb
+++ b/spec/lib/gitlab/backup/manager_spec.rb
@@ -141,8 +141,8 @@ describe Backup::Manager, lib: true do
it 'fails the operation and prints an error' do
expect { subject.unpack }.to raise_error SystemExit
- expect(progress).to have_received(:puts)
- .with(a_string_matching('No backups found'))
+ expect(progress).to have_received(:puts).
+ with(a_string_matching('No backups found'))
end
end
@@ -158,8 +158,8 @@ describe Backup::Manager, lib: true do
it 'fails the operation and prints an error' do
expect { subject.unpack }.to raise_error SystemExit
- expect(progress).to have_received(:puts)
- .with(a_string_matching('Found more than one backup'))
+ expect(progress).to have_received(:puts).
+ with(a_string_matching('Found more than one backup'))
end
end
@@ -178,8 +178,8 @@ describe Backup::Manager, lib: true do
it 'fails the operation and prints an error' do
expect { subject.unpack }.to raise_error SystemExit
expect(File).to have_received(:exist?).with('wrong_gitlab_backup.tar')
- expect(progress).to have_received(:puts)
- .with(a_string_matching('The backup file wrong_gitlab_backup.tar does not exist'))
+ expect(progress).to have_received(:puts).
+ with(a_string_matching('The backup file wrong_gitlab_backup.tar does not exist'))
end
end
@@ -200,8 +200,8 @@ describe Backup::Manager, lib: true do
it 'unpacks the file' do
subject.unpack
- expect(Kernel).to have_received(:system)
- .with("tar", "-xf", "1451606400_2016_01_01_gitlab_backup.tar")
+ expect(Kernel).to have_received(:system).
+ with("tar", "-xf", "1451606400_2016_01_01_gitlab_backup.tar")
expect(progress).to have_received(:puts).with(a_string_matching('done'))
end
end
diff --git a/spec/lib/gitlab/badge/build/status_spec.rb b/spec/lib/gitlab/badge/build/status_spec.rb
index 3c5414701a7..8a4bf4dc89b 100644
--- a/spec/lib/gitlab/badge/build/status_spec.rb
+++ b/spec/lib/gitlab/badge/build/status_spec.rb
@@ -20,8 +20,8 @@ describe Gitlab::Badge::Build::Status do
describe '#metadata' do
it 'returns badge metadata' do
- expect(badge.metadata.image_url)
- .to include 'badges/master/build.svg'
+ expect(badge.metadata.image_url).
+ to include 'badges/master/build.svg'
end
end
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 b8b0825a1c7..fa3dbd9bf32 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 00dad5d9591..281a110071a 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(['ls', 'pwd'])
- .create!
+ entry = factory.
+ value(['ls', 'pwd']).
+ create!
expect(entry.value).to eq ['ls', 'pwd']
end
context 'when setting description' do
it 'creates entry with description' do
- entry = factory
- .value(['ls', 'pwd'])
- .with(description: 'test description')
- .create!
+ entry = factory.
+ value(['ls', 'pwd']).
+ with(description: 'test description').
+ create!
expect(entry.value).to eq ['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(['ls', 'pwd'])
- .with(key: 'test key')
- .create!
+ entry = factory.
+ value(['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 432a99dce33..c3551a149ed 100644
--- a/spec/lib/gitlab/ci/config/entry/global_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/global_spec.rb
@@ -10,8 +10,8 @@ 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
+ expect(described_class.nodes.keys).
+ to match_array(%i[before_script image services
after_script variables stages
types cache])
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..b90308a0515 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,8 +138,8 @@ describe Gitlab::Ci::Config::Entry::Job do
end
it 'returns correct value' do
- expect(entry.value)
- .to eq(name: :rspec,
+ expect(entry.value).
+ to eq(name: :rspec,
before_script: %w[ls pwd],
script: %w[rspec],
commands: "ls\npwd\nrspec",
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 a55e5b4b8ac..b1e563e0786 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 e60c9aaf661..52f595e4b67 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 aa99cee2690..8c1305f376d 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 58327d08904..60aa510b746 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
diff --git a/spec/lib/gitlab/ci/status/build/common_spec.rb b/spec/lib/gitlab/ci/status/build/common_spec.rb
index 40b96b1807b..cd893a09748 100644
--- a/spec/lib/gitlab/ci/status/build/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/common_spec.rb
@@ -6,9 +6,9 @@ describe Gitlab::Ci::Status::Build::Common do
let(:project) { build.project }
subject do
- Gitlab::Ci::Status::Core
- .new(build, user)
- .extend(described_class)
+ Gitlab::Ci::Status::Core.
+ new(build, user).
+ extend(described_class)
end
describe '#has_action?' do
diff --git a/spec/lib/gitlab/ci/status/build/factory_spec.rb b/spec/lib/gitlab/ci/status/build/factory_spec.rb
index 0c40fca0c1a..3d1ebadadcc 100644
--- a/spec/lib/gitlab/ci/status/build/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/factory_spec.rb
@@ -16,8 +16,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Retryable]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Retryable]
end
it 'fabricates a retryable build status' do
@@ -42,8 +42,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Retryable]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Retryable]
end
it 'fabricates a retryable build status' do
@@ -67,8 +67,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Retryable,
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Retryable,
Gitlab::Ci::Status::Build::FailedAllowed]
end
@@ -96,8 +96,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Retryable]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Retryable]
end
it 'fabricates a retryable build status' do
@@ -121,8 +121,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Cancelable]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Cancelable]
end
it 'fabricates a canceable build status' do
@@ -146,8 +146,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Cancelable]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Cancelable]
end
it 'fabricates a cancelable build status' do
@@ -196,8 +196,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Play]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Play]
end
it 'fabricates a core skipped status' do
@@ -222,8 +222,8 @@ describe Gitlab::Ci::Status::Build::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::Build::Stop]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::Build::Stop]
end
it 'fabricates a core skipped status' do
diff --git a/spec/lib/gitlab/ci/status/extended_spec.rb b/spec/lib/gitlab/ci/status/extended_spec.rb
index c2d74ca5cde..459044eb968 100644
--- a/spec/lib/gitlab/ci/status/extended_spec.rb
+++ b/spec/lib/gitlab/ci/status/extended_spec.rb
@@ -6,7 +6,7 @@ describe Gitlab::Ci::Status::Extended do
end
it 'requires subclass to implement matcher' do
- expect { subject.matches?(double, double) }
- .to raise_error(NotImplementedError)
+ expect { subject.matches?(double, double) }.
+ to raise_error(NotImplementedError)
end
end
diff --git a/spec/lib/gitlab/ci/status/external/common_spec.rb b/spec/lib/gitlab/ci/status/external/common_spec.rb
index 5a97d98b55f..6a564eeb8b7 100644
--- a/spec/lib/gitlab/ci/status/external/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/external/common_spec.rb
@@ -10,9 +10,9 @@ describe Gitlab::Ci::Status::External::Common do
end
subject do
- Gitlab::Ci::Status::Core
- .new(external_status, user)
- .extend(described_class)
+ Gitlab::Ci::Status::Core.
+ new(external_status, user).
+ extend(described_class)
end
describe '#has_action?' do
diff --git a/spec/lib/gitlab/ci/status/factory_spec.rb b/spec/lib/gitlab/ci/status/factory_spec.rb
index bbf9c7c83a3..45fd49b91ea 100644
--- a/spec/lib/gitlab/ci/status/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/factory_spec.rb
@@ -84,15 +84,15 @@ describe Gitlab::Ci::Status::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [first_extended_status, second_extended_status]
+ expect(factory.extended_statuses).
+ to eq [first_extended_status, second_extended_status]
end
end
context 'when exclusive statuses are matches' do
before do
- allow(described_class).to receive(:extended_statuses)
- .and_return([[first_extended_status, second_extended_status]])
+ allow(described_class).to receive(:extended_statuses).
+ and_return([[first_extended_status, second_extended_status]])
end
it 'does not fabricate compound decorator' do
@@ -116,8 +116,8 @@ describe Gitlab::Ci::Status::Factory do
context 'when exclusive statuses are not matched' do
before do
- allow(described_class).to receive(:extended_statuses)
- .and_return([[first_extended_status], [second_extended_status]])
+ allow(described_class).to receive(:extended_statuses).
+ and_return([[first_extended_status], [second_extended_status]])
end
it_behaves_like 'compound decorator factory'
@@ -125,8 +125,8 @@ describe Gitlab::Ci::Status::Factory do
context 'when using simplified status grouping' do
before do
- allow(described_class).to receive(:extended_statuses)
- .and_return([first_extended_status, second_extended_status])
+ allow(described_class).to receive(:extended_statuses).
+ and_return([first_extended_status, second_extended_status])
end
it_behaves_like 'compound decorator factory'
diff --git a/spec/lib/gitlab/ci/status/pipeline/common_spec.rb b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
index d665674bf70..35dad60febf 100644
--- a/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/pipeline/common_spec.rb
@@ -6,9 +6,9 @@ describe Gitlab::Ci::Status::Pipeline::Common do
let(:pipeline) { create(:ci_pipeline, project: project) }
subject do
- Gitlab::Ci::Status::Core
- .new(pipeline, user)
- .extend(described_class)
+ Gitlab::Ci::Status::Core.
+ new(pipeline, user).
+ extend(described_class)
end
describe '#has_action?' do
@@ -29,8 +29,8 @@ describe Gitlab::Ci::Status::Pipeline::Common do
describe '#details_path' do
it 'links to the pipeline details page' do
- expect(subject.details_path)
- .to include "pipelines/#{pipeline.id}"
+ expect(subject.details_path).
+ to include "pipelines/#{pipeline.id}"
end
end
end
diff --git a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
index b10a447c27a..7cee4435931 100644
--- a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
@@ -34,8 +34,8 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
it 'extends core status with common pipeline methods' do
expect(status).to have_details
expect(status).not_to have_action
- expect(status.details_path)
- .to include "pipelines/#{pipeline.id}"
+ expect(status.details_path).
+ to include "pipelines/#{pipeline.id}"
end
end
end
@@ -55,8 +55,8 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
end
it 'matches correct extended statuses' do
- expect(factory.extended_statuses)
- .to eq [Gitlab::Ci::Status::SuccessWarning]
+ expect(factory.extended_statuses).
+ to eq [Gitlab::Ci::Status::SuccessWarning]
end
it 'fabricates extended "success with warnings" status' do
diff --git a/spec/lib/gitlab/ci/status/stage/common_spec.rb b/spec/lib/gitlab/ci/status/stage/common_spec.rb
index 8814a7614a0..3b25893d8c7 100644
--- a/spec/lib/gitlab/ci/status/stage/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/stage/common_spec.rb
@@ -10,8 +10,8 @@ describe Gitlab::Ci::Status::Stage::Common do
end
subject do
- Class.new(Gitlab::Ci::Status::Core)
- .new(stage, user).extend(described_class)
+ Class.new(Gitlab::Ci::Status::Core).
+ new(stage, user).extend(described_class)
end
it 'does not have action' do
@@ -19,10 +19,10 @@ describe Gitlab::Ci::Status::Stage::Common do
end
it 'links to the pipeline details page' do
- expect(subject.details_path)
- .to include "pipelines/#{pipeline.id}"
- expect(subject.details_path)
- .to include "##{stage.name}"
+ expect(subject.details_path).
+ to include "pipelines/#{pipeline.id}"
+ expect(subject.details_path).
+ to include "##{stage.name}"
end
context 'when user has permission to read pipeline' do
diff --git a/spec/lib/gitlab/ci/status/stage/factory_spec.rb b/spec/lib/gitlab/ci/status/stage/factory_spec.rb
index bbb40e2c1ab..c8503392b34 100644
--- a/spec/lib/gitlab/ci/status/stage/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/stage/factory_spec.rb
@@ -55,8 +55,8 @@ describe Gitlab::Ci::Status::Stage::Factory do
end
it 'fabricates extended "success with warnings" status' do
- expect(status)
- .to be_a Gitlab::Ci::Status::SuccessWarning
+ expect(status).
+ to be_a Gitlab::Ci::Status::SuccessWarning
end
it 'extends core status with common stage method' do
diff --git a/spec/lib/gitlab/data_builder/note_spec.rb b/spec/lib/gitlab/data_builder/note_spec.rb
index 04ec34492e1..7658153df0b 100644
--- a/spec/lib/gitlab/data_builder/note_spec.rb
+++ b/spec/lib/gitlab/data_builder/note_spec.rb
@@ -9,8 +9,8 @@ describe Gitlab::DataBuilder::Note, lib: true do
before(:each) do
expect(data).to have_key(:object_attributes)
expect(data[:object_attributes]).to have_key(:url)
- expect(data[:object_attributes][:url])
- .to eq(Gitlab::UrlBuilder.build(note))
+ expect(data[:object_attributes][:url]).
+ to eq(Gitlab::UrlBuilder.build(note))
expect(data[:object_kind]).to eq('note')
expect(data[:user]).to eq(user.hook_attrs)
end
@@ -49,10 +49,10 @@ describe Gitlab::DataBuilder::Note, lib: true do
it 'returns the note and issue-specific data' do
expect(data).to have_key(:issue)
- expect(data[:issue].except('updated_at'))
- .to eq(issue.reload.hook_attrs.except('updated_at'))
- expect(data[:issue]['updated_at'])
- .to be > issue.hook_attrs['updated_at']
+ expect(data[:issue].except('updated_at')).
+ to eq(issue.reload.hook_attrs.except('updated_at'))
+ expect(data[:issue]['updated_at']).
+ to be > issue.hook_attrs['updated_at']
end
include_examples 'project hook data'
@@ -73,10 +73,10 @@ describe Gitlab::DataBuilder::Note, lib: true do
it 'returns the note and merge request data' do
expect(data).to have_key(:merge_request)
- expect(data[:merge_request].except('updated_at'))
- .to eq(merge_request.reload.hook_attrs.except('updated_at'))
- expect(data[:merge_request]['updated_at'])
- .to be > merge_request.hook_attrs['updated_at']
+ expect(data[:merge_request].except('updated_at')).
+ to eq(merge_request.reload.hook_attrs.except('updated_at'))
+ expect(data[:merge_request]['updated_at']).
+ to be > merge_request.hook_attrs['updated_at']
end
include_examples 'project hook data'
@@ -96,10 +96,10 @@ describe Gitlab::DataBuilder::Note, lib: true do
it 'returns the note and merge request diff data' do
expect(data).to have_key(:merge_request)
- expect(data[:merge_request].except('updated_at'))
- .to eq(merge_request.reload.hook_attrs.except('updated_at'))
- expect(data[:merge_request]['updated_at'])
- .to be > merge_request.hook_attrs['updated_at']
+ expect(data[:merge_request].except('updated_at')).
+ to eq(merge_request.reload.hook_attrs.except('updated_at'))
+ expect(data[:merge_request]['updated_at']).
+ to be > merge_request.hook_attrs['updated_at']
end
include_examples 'project hook data'
@@ -119,10 +119,10 @@ describe Gitlab::DataBuilder::Note, lib: true do
it 'returns the note and project snippet data' do
expect(data).to have_key(:snippet)
- expect(data[:snippet].except('updated_at'))
- .to eq(snippet.reload.hook_attrs.except('updated_at'))
- expect(data[:snippet]['updated_at'])
- .to be > snippet.hook_attrs['updated_at']
+ expect(data[:snippet].except('updated_at')).
+ to eq(snippet.reload.hook_attrs.except('updated_at'))
+ expect(data[:snippet]['updated_at']).
+ to be > snippet.hook_attrs['updated_at']
end
include_examples 'project hook data'
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb
index edd01d032c8..5eff7e8425b 100644
--- a/spec/lib/gitlab/database_spec.rb
+++ b/spec/lib/gitlab/database_spec.rb
@@ -120,8 +120,8 @@ describe Gitlab::Database, lib: true do
pool = described_class.create_connection_pool(5)
begin
- expect(pool)
- .to be_kind_of(ActiveRecord::ConnectionAdapters::ConnectionPool)
+ expect(pool).
+ to be_kind_of(ActiveRecord::ConnectionAdapters::ConnectionPool)
expect(pool.spec.config[:pool]).to eq(5)
ensure
diff --git a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
index 08a42fd27a2..c141762421f 100644
--- a/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/avatar_restorer_spec.rb
@@ -7,8 +7,8 @@ describe Gitlab::ImportExport::AvatarRestorer, lib: true do
let(:project) { create(:empty_project) }
before do
- allow_any_instance_of(described_class).to receive(:avatar_export_file)
- .and_return(uploaded_image_temp_path)
+ allow_any_instance_of(described_class).to receive(:avatar_export_file).
+ and_return(uploaded_image_temp_path)
end
after do
diff --git a/spec/lib/gitlab/incoming_email_spec.rb b/spec/lib/gitlab/incoming_email_spec.rb
index 698bd72d0f8..06d39d5c782 100644
--- a/spec/lib/gitlab/incoming_email_spec.rb
+++ b/spec/lib/gitlab/incoming_email_spec.rb
@@ -99,8 +99,8 @@ describe Gitlab::IncomingEmail, lib: true do
end
it 'returns reply key' do
- expect(described_class.scan_fallback_references(references))
- .to eq(%w[issue_1@localhost
+ expect(described_class.scan_fallback_references(references)).
+ to eq(%w[issue_1@localhost
reply-59d8df8370b7e95c5a49fbf86aeb2c93@localhost
exchange@microsoft.com])
end
diff --git a/spec/lib/gitlab/ldap/adapter_spec.rb b/spec/lib/gitlab/ldap/adapter_spec.rb
index 563c074017a..fe3709f30e1 100644
--- a/spec/lib/gitlab/ldap/adapter_spec.rb
+++ b/spec/lib/gitlab/ldap/adapter_spec.rb
@@ -34,8 +34,8 @@ describe Gitlab::LDAP::Adapter, lib: true do
end
it 'searches with the proper options when searching with a limit' do
- expect(adapter)
- .to receive(:ldap_search).with(hash_including(size: 100)).and_return({})
+ expect(adapter).
+ to receive(:ldap_search).with(hash_including(size: 100)).and_return({})
adapter.users('uid', 'johndoe', 100)
end
diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb
index fc9e1cb430a..8d9352350f0 100644
--- a/spec/lib/gitlab/o_auth/user_spec.rb
+++ b/spec/lib/gitlab/o_auth/user_spec.rb
@@ -184,8 +184,8 @@ describe Gitlab::OAuth::User, lib: true do
oauth_user.save
identities_as_hash = gl_user.identities.map { |id| { provider: id.provider, extern_uid: id.extern_uid } }
- expect(identities_as_hash)
- .to match_array(
+ expect(identities_as_hash).
+ to match_array(
[
{ provider: 'ldapmain', extern_uid: 'uid=user1,ou=People,dc=example' },
{ provider: 'twitter', extern_uid: uid }
diff --git a/spec/lib/gitlab/serializer/pagination_spec.rb b/spec/lib/gitlab/serializer/pagination_spec.rb
index 519eb1b274f..e05160da7a6 100644
--- a/spec/lib/gitlab/serializer/pagination_spec.rb
+++ b/spec/lib/gitlab/serializer/pagination_spec.rb
@@ -6,11 +6,11 @@ describe Gitlab::Serializer::Pagination do
let(:headers) { spy('headers') }
before do
- allow(request).to receive(:query_parameters)
- .and_return(params)
+ allow(request).to receive(:query_parameters).
+ and_return(params)
- allow(response).to receive(:headers)
- .and_return(headers)
+ allow(response).to receive(:headers).
+ and_return(headers)
end
let(:pagination) { described_class.new(request, response) }