diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 16:54:59 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 09:33:19 -0600 |
commit | 56de781a2cef437b6e1af748dc0c231af74e044d (patch) | |
tree | c8186a283904e3cc7461c4289cd2e1a8a9daa69c /spec/workers | |
parent | 1fe7501b49f896b74102c4b970310aa9ae34da85 (diff) | |
download | gitlab-ce-56de781a2cef437b6e1af748dc0c231af74e044d.tar.gz |
Revert "Enable Style/DotPosition"
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.
# Conflicts:
# .rubocop.yml
# .rubocop_todo.yml
# lib/gitlab/ci/config/entry/global.rb
# lib/gitlab/ci/config/entry/jobs.rb
# spec/lib/gitlab/ci/config/entry/factory_spec.rb
# spec/lib/gitlab/ci/config/entry/global_spec.rb
# spec/lib/gitlab/ci/config/entry/job_spec.rb
# spec/lib/gitlab/ci/status/build/factory_spec.rb
# spec/lib/gitlab/incoming_email_spec.rb
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/build_coverage_worker_spec.rb | 8 | ||||
-rw-r--r-- | spec/workers/build_finished_worker_spec.rb | 20 | ||||
-rw-r--r-- | spec/workers/build_hooks_worker_spec.rb | 8 | ||||
-rw-r--r-- | spec/workers/build_success_worker_spec.rb | 12 | ||||
-rw-r--r-- | spec/workers/pipeline_hooks_worker_spec.rb | 8 | ||||
-rw-r--r-- | spec/workers/pipeline_proccess_worker_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/pipeline_success_worker_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/pipeline_update_worker_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/project_cache_worker_spec.rb | 12 | ||||
-rw-r--r-- | spec/workers/use_key_worker_spec.rb | 4 |
10 files changed, 42 insertions, 42 deletions
diff --git a/spec/workers/build_coverage_worker_spec.rb b/spec/workers/build_coverage_worker_spec.rb index 8ebf00374a1..ba20488f663 100644 --- a/spec/workers/build_coverage_worker_spec.rb +++ b/spec/workers/build_coverage_worker_spec.rb @@ -6,8 +6,8 @@ describe BuildCoverageWorker do let!(:build) { create(:ci_build) } it 'updates code coverage' do - expect_any_instance_of(Ci::Build). - to receive(:update_coverage) + expect_any_instance_of(Ci::Build) + .to receive(:update_coverage) described_class.new.perform(build.id) end @@ -15,8 +15,8 @@ describe BuildCoverageWorker do context 'when build does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb index f8119913116..2868167c7d4 100644 --- a/spec/workers/build_finished_worker_spec.rb +++ b/spec/workers/build_finished_worker_spec.rb @@ -6,15 +6,15 @@ describe BuildFinishedWorker do let(:build) { create(:ci_build) } it 'calculates coverage and calls hooks' do - expect(BuildCoverageWorker). - to receive(:new).ordered.and_call_original - expect(BuildHooksWorker). - to receive(:new).ordered.and_call_original + expect(BuildCoverageWorker) + .to receive(:new).ordered.and_call_original + expect(BuildHooksWorker) + .to receive(:new).ordered.and_call_original - expect_any_instance_of(BuildCoverageWorker). - to receive(:perform) - expect_any_instance_of(BuildHooksWorker). - to receive(:perform) + expect_any_instance_of(BuildCoverageWorker) + .to receive(:perform) + expect_any_instance_of(BuildHooksWorker) + .to receive(:perform) described_class.new.perform(build.id) end @@ -22,8 +22,8 @@ describe BuildFinishedWorker do context 'when build does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/build_hooks_worker_spec.rb b/spec/workers/build_hooks_worker_spec.rb index 51abc1d89a1..97654a93f5c 100644 --- a/spec/workers/build_hooks_worker_spec.rb +++ b/spec/workers/build_hooks_worker_spec.rb @@ -6,8 +6,8 @@ describe BuildHooksWorker do let!(:build) { create(:ci_build) } it 'calls build hooks' do - expect_any_instance_of(Ci::Build). - to receive(:execute_hooks) + expect_any_instance_of(Ci::Build) + .to receive(:execute_hooks) described_class.new.perform(build.id) end @@ -15,8 +15,8 @@ describe BuildHooksWorker do context 'when build does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/build_success_worker_spec.rb b/spec/workers/build_success_worker_spec.rb index d016ecbb738..dba70883130 100644 --- a/spec/workers/build_success_worker_spec.rb +++ b/spec/workers/build_success_worker_spec.rb @@ -7,8 +7,8 @@ describe BuildSuccessWorker do let!(:build) { create(:ci_build, environment: 'production') } it 'executes deployment service' do - expect_any_instance_of(CreateDeploymentService). - to receive(:execute) + expect_any_instance_of(CreateDeploymentService) + .to receive(:execute) described_class.new.perform(build.id) end @@ -18,8 +18,8 @@ describe BuildSuccessWorker do let!(:build) { create(:ci_build, project: nil) } it 'does not create deployment' do - expect_any_instance_of(CreateDeploymentService). - not_to receive(:execute) + expect_any_instance_of(CreateDeploymentService) + .not_to receive(:execute) described_class.new.perform(build.id) end @@ -28,8 +28,8 @@ describe BuildSuccessWorker do context 'when build does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/pipeline_hooks_worker_spec.rb b/spec/workers/pipeline_hooks_worker_spec.rb index 061f4bda36c..035e329839f 100644 --- a/spec/workers/pipeline_hooks_worker_spec.rb +++ b/spec/workers/pipeline_hooks_worker_spec.rb @@ -6,8 +6,8 @@ describe PipelineHooksWorker do let(:pipeline) { create(:ci_pipeline) } it 'executes hooks for the pipeline' do - expect_any_instance_of(Ci::Pipeline). - to receive(:execute_hooks) + expect_any_instance_of(Ci::Pipeline) + .to receive(:execute_hooks) described_class.new.perform(pipeline.id) end @@ -15,8 +15,8 @@ describe PipelineHooksWorker do context 'when pipeline does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/pipeline_proccess_worker_spec.rb b/spec/workers/pipeline_proccess_worker_spec.rb index fd6ee0714ea..86e9d7f6684 100644 --- a/spec/workers/pipeline_proccess_worker_spec.rb +++ b/spec/workers/pipeline_proccess_worker_spec.rb @@ -14,8 +14,8 @@ describe PipelineProcessWorker do context 'when pipeline does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/pipeline_success_worker_spec.rb b/spec/workers/pipeline_success_worker_spec.rb index f6c56465feb..d1c84adda6f 100644 --- a/spec/workers/pipeline_success_worker_spec.rb +++ b/spec/workers/pipeline_success_worker_spec.rb @@ -16,8 +16,8 @@ describe PipelineSuccessWorker do context 'when pipeline does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/pipeline_update_worker_spec.rb b/spec/workers/pipeline_update_worker_spec.rb index 24d78aae112..0b456cfd0da 100644 --- a/spec/workers/pipeline_update_worker_spec.rb +++ b/spec/workers/pipeline_update_worker_spec.rb @@ -14,8 +14,8 @@ describe PipelineUpdateWorker do context 'when pipeline does not exist' do it 'does not raise exception' do - expect { described_class.new.perform(123) }. - not_to raise_error + expect { described_class.new.perform(123) } + .not_to raise_error end end end diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb index 0fc274f1a01..f4f63b57a5f 100644 --- a/spec/workers/project_cache_worker_spec.rb +++ b/spec/workers/project_cache_worker_spec.rb @@ -31,9 +31,9 @@ describe ProjectCacheWorker do context 'with an existing project' do it 'updates the project statistics' do - expect(worker).to receive(:update_statistics). - with(kind_of(Project), %i(repository_size)). - and_call_original + expect(worker).to receive(:update_statistics) + .with(kind_of(Project), %i(repository_size)) + .and_call_original worker.perform(project.id, [], %w(repository_size)) end @@ -67,9 +67,9 @@ describe ProjectCacheWorker do with(project.id, :update_statistics). and_return(true) - expect(statistics).to receive(:refresh!). - with(only: %i(repository_size)). - and_call_original + expect(statistics).to receive(:refresh!) + .with(only: %i(repository_size)) + .and_call_original worker.update_statistics(project, %i(repository_size)) end diff --git a/spec/workers/use_key_worker_spec.rb b/spec/workers/use_key_worker_spec.rb index f8752c42a49..e50c788b82a 100644 --- a/spec/workers/use_key_worker_spec.rb +++ b/spec/workers/use_key_worker_spec.rb @@ -8,8 +8,8 @@ describe UseKeyWorker do current_time = Time.zone.now Timecop.freeze(current_time) do - expect { worker.perform(key.id) }. - to change { key.reload.last_used_at }.from(nil).to be_like_time(current_time) + expect { worker.perform(key.id) } + .to change { key.reload.last_used_at }.from(nil).to be_like_time(current_time) end end |