You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: abort_pipelines_service_spec.rb
    path of file: ./repos/gitlabhq/spec/services/ci
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spe
    
    def expect_correct_stage_cancellations
      expect(cancelable_pipeline.stages - [non_cancelable_stage]).to all(be_failed)
      expect(manual_pipeline.stages - [manual_pipeline_non_cancelable_stage]).to all(be_failed)

      expect(non_cancelable_stage).not_to be_failed
      expect(manual_pipeline_non_cancelable_stage).not_to be_failed
    end