class RuboCop::Cop::Registry

def self.with_temporary_global(temp_global = global.dup)

Intended for testing purposes
Changes momentarily the global registry
def self.with_temporary_global(temp_global = global.dup)
  previous = @global
  @global = temp_global
  yield
ensure
  @global = previous
end