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: configuration_spec.rb
    path of file: ./repos/bugsnag-ruby/spec
    
    the code of the file until where you have to start completion: # encoding: utf-8
require 'spec_helper'
require 'support/shared_examples_for_metadata'

describe Bugsnag::Configuration do
  describe "delivery_method" do
    it "should have the default delivery method" do
      expect(subject.delivery_method).to eq(:thread_queue)
    end

    it "should have the defined delivery_method" do
      subject.delivery_method = :test
      expect(subject.delivery_method).to eq(:test)
    end

    it "should allow a new default delivery_method to be set" do
      subject.default_delivery_method = :test
      expect(subject.delivery_method).to eq(:test)
    end

    it "should allow the delivery_method to be set over a default" do
      subject.default_delivery_method = :test
      subject.delivery_method = :wow
      expect(subject.delivery_method).to eq(:wow)
    end
  end

  describe "release_stage" do
    after(:each) do
      ENV["BUGSNAG_RELEASE_STAGE"] = nil
    end

    it "has no default value" do
      expect(subject.release_stage).to be_nil
    end

    it "uses the 'BUGSNAG_RELEASE_STAGE' environment variable if set" do
      ENV["BUGSNAG_RELEASE_STAGE"] = "foobar"
      expect(subject.release_stage).to eq("foobar")
    end
  end

  describe "app_type" do
    it "should default to nil" do
      expect(subject.app_type).to be_nil
    end

    it "should be settable directly" do
      subject.app_type = :test
      expect(subject.app_type).to eq(:test)
    end

    it "should allow a detected app_type to be set" do
      subject.detected_app_type = :test
      expect(subject.app_type).to eq(:test)
    end

    it "should allow the app_type to be set over a default" do
      subject.detected_app_type = :test
      subject.app_type = :wow
      expect(subject.app_type).to eq(:wow)
    end
  end

  describe "context" do
    it "should default to nil" do
      expect(subject.context).to be_nil
    end

    it "should be settable" do
      subject.context = "test"
      expect(subject.context).to eq("test")
    end
  end

  describe "#auto_capture_sessions" do
    it "defaults to true" do
      expect(subject.auto_capture_sessions).to eq(true)
    end
  end

  describe "#auto_track_sessions"
    
    def output_lines
      @output.rewind # always read from the start of output
      @output.readlines.map(&:chomp) # old rubies don't support `readlines(chomp: true)`
    end

    context "using configure" do
      before do
        Bugsnag.configuration.api_key = nil
        Bugsnag.instance_variable_set("@key_warning", nil)
        ENV['BUGSNAG_API_KEY'] = nil
        expect(output_lines).to be_empty
      end

      context "API key is not specified" do
        it "skips logging a warning if validate_api_key is false" do
          Bugsnag.configure(false)
          expect(output_lines).to be_empty
        end

        it "logs a warning by default" do
          Bugsnag.configure

          expect(output_lines.length).to be(1)
          expect(output_lines.first).to eq(
            '[Bugsnag] WARN: No valid API key has been set, notifications will not be sent'
          )
        end

        it "logs a warning if validate_api_key is true" do
          Bugsnag.configure(true)

          expect(output_lines.length).to be(1)
          expect(output_lines.first).to eq(
            '[Bugsnag] WARN: No valid API key has been set, notifications will not be sent'
          )
        end
      end

      context "API key is set" do
        it "skips logging a warning when configuring with an API key" do
          Bugsnag.configure do |config|
            config.api_key = 'd57a2472bd130ac0ab0f52715bbdc600'
          end

          expect(output_lines).to be_empty
        end

        it "logs a warning if the configured API key is invalid" do
          Bugsnag.configure do |config|
            config.api_key = 'WARNING: not a real key'
          end

          expect(output_lines.length).to be(1)
          expect(output_lines.first).to eq(
            '[Bugsnag] WARN: No valid API key has been set, notifications will not be sent'
          )
        end
      end
    end

    it "should log info messages to the set logger" do
      expect(output_lines).to be_empty

      Bugsnag.configuration.info("Info message")

      expect(output_lines.length).to be(1)
      expect(output_lines.first).to eq('[Bugsnag] INFO: Info message')
    end

    it "should log warning messages to the set logger" do
      expect(output_lines).to be_empty

      Bugsnag.configuration.warn("Warning message")

      expect(output_lines.length).to be(1)
      expect(output_lines.first).to eq('[Bugsnag] WARN: Warning message')
    end

    it "should log error messages to the set logger" do
      expect(output_lines).to be_empty

      Bugsnag.configuration.error("Error message")

      expect(output_lines.length).to be(1)
      expect(output_lines.first).to eq('[Bugsnag] ERROR: Error message')
    end

    it "should log debug messages to the set logger" do
      expect(output_lines).to be_empty

      Bugsnag.configuration.debug("Debug message")

      expect(output_lines.length).to be(1)
      expect(output_lines.first).to eq('[Bugsnag] DEBUG: Debug message')
    end
  end