diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-21 16:48:12 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-21 16:48:12 +0300 |
commit | 0430b7644101fc70ed4be6bf69ccf05b900f4cdf (patch) | |
tree | 3ea258c4da6e0f9c6e0f7523191fdb0a64a15c73 /spec/workers/project_cache_worker_spec.rb | |
parent | 78ee24ba53a4a44d829613495ec0d5f1bbb5a9ee (diff) |
Enable Style/DotPosition Rubocop :cop:
Diffstat (limited to 'spec/workers/project_cache_worker_spec.rb')
-rw-r--r-- | spec/workers/project_cache_worker_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/workers/project_cache_worker_spec.rb b/spec/workers/project_cache_worker_spec.rb index a4ba5f7c943..6b1f2ff3227 100644 --- a/spec/workers/project_cache_worker_spec.rb +++ b/spec/workers/project_cache_worker_spec.rb @@ -7,8 +7,8 @@ describe ProjectCacheWorker do describe '#perform' do before do - allow_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain). - and_return(true) + allow_any_instance_of(Gitlab::ExclusiveLease).to receive(:try_obtain) + .and_return(true) end context 'with a non-existing project' do @@ -39,9 +39,9 @@ describe ProjectCacheWorker do end it 'refreshes the method caches' do - expect_any_instance_of(Repository).to receive(:refresh_method_caches). - with(%i(readme)). - and_call_original + expect_any_instance_of(Repository).to receive(:refresh_method_caches) + .with(%i(readme)) + .and_call_original worker.perform(project.id, %w(readme)) end @@ -51,9 +51,9 @@ describe ProjectCacheWorker do allow(MarkupHelper).to receive(:gitlab_markdown?).and_return(false) allow(MarkupHelper).to receive(:plain?).and_return(true) - expect_any_instance_of(Repository).to receive(:refresh_method_caches). - with(%i(readme)). - and_call_original + expect_any_instance_of(Repository).to receive(:refresh_method_caches) + .with(%i(readme)) + .and_call_original worker.perform(project.id, %w(readme)) end end @@ -63,9 +63,9 @@ describe ProjectCacheWorker do describe '#update_statistics' do context 'when a lease could not be obtained' do it 'does not update the repository size' do - allow(worker).to receive(:try_obtain_lease_for). - with(project.id, :update_statistics). - and_return(false) + allow(worker).to receive(:try_obtain_lease_for) + .with(project.id, :update_statistics) + .and_return(false) expect(statistics).not_to receive(:refresh!) @@ -75,9 +75,9 @@ describe ProjectCacheWorker do context 'when a lease could be obtained' do it 'updates the project statistics' do - allow(worker).to receive(:try_obtain_lease_for). - with(project.id, :update_statistics). - and_return(true) + allow(worker).to receive(:try_obtain_lease_for) + .with(project.id, :update_statistics) + .and_return(true) expect(statistics).to receive(:refresh!) .with(only: %i(repository_size)) |