summaryrefslogtreecommitdiff
path: root/spec/lib/puppet_spec/verbose.rb
blob: b2683df048364dec4990db9c4d19651edd98b13a (plain)
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/env ruby -S rspec
# Support code for running stuff with warnings disabled.
module Kernel
  def with_verbose_disabled
    verbose, $VERBOSE = $VERBOSE, nil
    result = yield
    $VERBOSE = verbose
    return result
  end
end