diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-23 01:54:59 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:33:19 +0300 |
commit | 56de781a2cef437b6e1af748dc0c231af74e044d (patch) | |
tree | c8186a283904e3cc7461c4289cd2e1a8a9daa69c /spec/services/merge_requests | |
parent | 1fe7501b49f896b74102c4b970310aa9ae34da85 (diff) |
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/services/merge_requests')
3 files changed, 21 insertions, 21 deletions
diff --git a/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb b/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb index 881458c190f..d80fb8a1af1 100644 --- a/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb +++ b/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb @@ -29,9 +29,9 @@ describe MergeRequests::AddTodoWhenBuildFailsService do end before do - allow_any_instance_of(MergeRequest). - to receive(:head_pipeline). - and_return(pipeline) + allow_any_instance_of(MergeRequest) + .to receive(:head_pipeline) + .and_return(pipeline) allow(service).to receive(:todo_service).and_return(todo_service) end @@ -113,9 +113,9 @@ describe MergeRequests::AddTodoWhenBuildFailsService do it 'resolves todos about failed builds for pipeline' do service.close_all(pipeline) - expect(todo_service). - to have_received(:merge_request_build_retried). - with(merge_request) + expect(todo_service) + .to have_received(:merge_request_build_retried) + .with(merge_request) end end @@ -125,8 +125,8 @@ describe MergeRequests::AddTodoWhenBuildFailsService do it 'does not resolve any todos about failed builds' do service.close_all(pipeline) - expect(todo_service). - not_to have_received(:merge_request_build_retried) + expect(todo_service) + .not_to have_received(:merge_request_build_retried) end end end diff --git a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb index 65c08ce15f7..f92978a33a3 100644 --- a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb @@ -27,9 +27,9 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do context 'first time enabling' do before do - allow(merge_request). - to receive(:head_pipeline). - and_return(pipeline) + allow(merge_request) + .to receive(:head_pipeline) + .and_return(pipeline) service.execute(merge_request) end @@ -52,11 +52,11 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do let(:build) { create(:ci_build, ref: mr_merge_if_green_enabled.source_branch) } before do - allow(mr_merge_if_green_enabled).to receive(:head_pipeline). - and_return(pipeline) + allow(mr_merge_if_green_enabled).to receive(:head_pipeline) + .and_return(pipeline) - allow(mr_merge_if_green_enabled).to receive(:mergeable?). - and_return(true) + allow(mr_merge_if_green_enabled).to receive(:mergeable?) + .and_return(true) allow(pipeline).to receive(:success?).and_return(true) end @@ -152,9 +152,9 @@ describe MergeRequests::MergeWhenPipelineSucceedsService do before do # This behavior of MergeRequest: we instantiate a new object # - allow_any_instance_of(MergeRequest). - to receive(:head_pipeline). - and_wrap_original do + allow_any_instance_of(MergeRequest) + .to receive(:head_pipeline) + .and_wrap_original do Ci::Pipeline.find(pipeline.id) end end diff --git a/spec/services/merge_requests/resolve_service_spec.rb b/spec/services/merge_requests/resolve_service_spec.rb index 57b1c088ce4..c3b468ac47f 100644 --- a/spec/services/merge_requests/resolve_service_spec.rb +++ b/spec/services/merge_requests/resolve_service_spec.rb @@ -60,7 +60,7 @@ describe MergeRequests::ResolveService do it 'creates a commit with the correct parents' do expect(merge_request.source_branch_head.parents.map(&:id)). to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06 - 824be604a34828eb682305f0d963056cfac87b2d)) + 824be604a34828eb682305f0d963056cfac87b2d)) end end @@ -86,7 +86,7 @@ describe MergeRequests::ResolveService do it 'creates a commit with the correct parents' do expect(merge_request_from_fork.source_branch_head.parents.map(&:id)). to eq(['404fa3fc7c2c9b5dacff102f353bdf55b1be2813', - target_head]) + target_head]) end end end @@ -126,7 +126,7 @@ describe MergeRequests::ResolveService do it 'creates a commit with the correct parents' do expect(merge_request.source_branch_head.parents.map(&:id)). to eq(%w(1450cd639e0bc6721eb02800169e464f212cde06 - 824be604a34828eb682305f0d963056cfac87b2d)) + 824be604a34828eb682305f0d963056cfac87b2d)) end it 'sets the content to the content given' do |