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: spec_helper.rb
    path of file: ./repos/nomad-ruby/spec
    
    the code of the file until where you have to start completion: $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
require "nom
    
def with_stubbed_env(env = {})
  old = ENV.to_hash
  env.each do |k,v|
    if v.nil?
      ENV.delete(k.to_s)
    else
      ENV[k.to_s] = v.to_s
    end
  end