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: test_helper.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/actionmailer-5.0.3/lib/action_mailer
    
    the code of the file until where you have to start completion: require 'active_job'

module ActionMailer
  # Provides helper methods for testing Action Mailer, including #asse
    
    def assert_emails(number)
      if block_given?
        original_count = ActionMailer::Base.deliveries.size
        yield
        new_count = ActionMailer::Base.deliveries.size
        assert_equal number, new_count - original_count, "#{number} emails expected, but #{new_count - original_count} were sent"
      else
        assert_equal number, ActionMailer::Base.deliveries.size
      end