module Maxitest::Helpers::InstanceMethods

def with_env(env)

def with_env(env)
  _synchronize do
    old = ENV.to_h
    env.each { |k, v| ENV[k.to_s] = v }
    yield
  ensure
    ENV.replace old
  end
end