diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-06-14 21:18:56 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-06-14 21:18:56 +0300 |
commit | a6ec5121f0c844786c84c568a3200562ec58a9c2 (patch) | |
tree | d29b9be6fd5ba51fbfc5e4a5cff52aad982d4c1e /spec/workers/stuck_ci_jobs_worker_spec.rb | |
parent | 69ad827e829175bebb985c8afe76174f42fc60bc (diff) |
Correct RSpec/SingleLineHook cop offenses
Diffstat (limited to 'spec/workers/stuck_ci_jobs_worker_spec.rb')
-rw-r--r-- | spec/workers/stuck_ci_jobs_worker_spec.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/workers/stuck_ci_jobs_worker_spec.rb b/spec/workers/stuck_ci_jobs_worker_spec.rb index 8434b0c8e5b..549635f7f33 100644 --- a/spec/workers/stuck_ci_jobs_worker_spec.rb +++ b/spec/workers/stuck_ci_jobs_worker_spec.rb @@ -34,7 +34,9 @@ describe StuckCiJobsWorker do let(:status) { 'pending' } context 'when job is not stuck' do - before { allow_any_instance_of(Ci::Build).to receive(:stuck?).and_return(false) } + before do + allow_any_instance_of(Ci::Build).to receive(:stuck?).and_return(false) + end context 'when job was not updated for more than 1 day ago' do let(:updated_at) { 2.days.ago } @@ -53,7 +55,9 @@ describe StuckCiJobsWorker do end context 'when job is stuck' do - before { allow_any_instance_of(Ci::Build).to receive(:stuck?).and_return(true) } + before do + allow_any_instance_of(Ci::Build).to receive(:stuck?).and_return(true) + end context 'when job was not updated for more than 1 hour ago' do let(:updated_at) { 2.hours.ago } @@ -93,7 +97,9 @@ describe StuckCiJobsWorker do let(:status) { 'running' } let(:updated_at) { 2.days.ago } - before { job.project.update(pending_delete: true) } + before do + job.project.update(pending_delete: true) + end it 'does not drop job' do expect_any_instance_of(Ci::Build).not_to receive(:drop) |