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: logging_spec.rb
    path of file: ./repos/puppet/spec/unit/util
    
    the code of the file until where you have to start completion: require 'spec_helper'

require '
    
      def setup(level, message)
        allow(Facter).to receive(:on_message).and_yield(level, message)

        # Transform from Facter level to Puppet level
        case level
        when :trace
          level = :debug
        when :warn
          level = :warning
        when :error
          level = :err
        when :fatal
          level = :crit
        end