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: submodule_helper_spec.rb
    path of file: ./repos/gitlabhq/spec/helpers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'spec_helper'

RSpec.describe Submod
    
      def expect_relative_link_to_resolve_to(relative_path, expected_path)
        stub_url(relative_path)
        result = subject

        aggregate_failures do
          expect(result.web).to eq(expected_path)
          expect(result.tree).to eq("#{expected_path}/-/tree/#{submodule_item.id}")
          expect(result.compare).to be_nil
        end
      end