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: announcement_notifier_spec.rb
    path of file: ./repos/coursemology2/spec/notifiers/course
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
require 'rails_helper'

RSpec.describe Course::AnnouncementNotifier, type: :mailer do
  let!(:instance) { Inst
    
      def set_announcement_email_setting(setting, regular, phantom)
        email_setting = course.
                        setting_emails.
                        where(component: :announcements,
                              course_assessment_category_id: nil,
                              setting: setting).first
        email_setting.update!(regular: regular, phantom: phantom)
      end