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: setup_bundler_test.rb
    path of file: ./repos/ruby-lsp/test
    
    the code of the file until where you have to start completion: # typed: true
# frozen_string_literal: true

require "test_helper"
require "ruby_lsp/setup_bundler"

class SetupBundlerTest < Minitest::Test
  def test_does_nothing_if_both_ruby_lsp_and_debug_are_in_the_bundle
    Object.any_instance.expects(:system).with(bundle_env, "(bundle check || bundle install) 1>&2")
    Bundler::LockfileParser.any_instance.expects(:dependencies).returns({ "ruby-lsp" => true, "debug" => true })
    run_script
    refute_path_exists(".ruby-lsp")
  end


    
  def test_creates_custom_bundle_with_specified_branch
    Dir.mktmpdir do |dir|
      Dir.chdir(dir) do
        bundle_gemfile = Pathname.new(".ruby-lsp").expand_path(Dir.pwd) + "Gemfile"
        Object.any_instance.expects(:system).with(
          bundle_env(bundle_gemfile.to_s),
          "(bundle check || bundle install) 1>&2",
        )

        Bundler.with_unbundled_env do
          run_script(branch: "test-branch")
        end

        assert_path_exists(".ruby-lsp")
        assert_path_exists(".ruby-lsp/Gemfile")
        assert_match(%r{ruby-lsp.*github: "Shopify/ruby-lsp", branch: "test-branch"}, File.read(".ruby-lsp/Gemfile"))
        assert_match("debug", File.read(".ruby-lsp/Gemfile"))
      end
    end
  end