module Fauxhai
  require 'fauxhai/exception'
  require 'fauxhai/fetcher'
  require 'fauxhai/mocker'
  require 'fauxhai/version'

  def self.root
    @@root ||= File.expand_path('../../', __FILE__)
  end

  def self.mock(*args, &block)
    Fauxhai::Mocker.new(*args, &block)
  end

  def self.fetch(*args, &block)
    Fauxhai::Fetcher.new(*args, &block)
  end
end

module Fauxhai
  autoload :Exception, 'fauxhai/exception'
  autoload :Fetcher, 'fauxhai/fetcher'
  autoload :Mocker, 'fauxhai/mocker'
  autoload :VERSION, 'fauxhai/version'

  def self.root
    @@root ||= File.expand_path('../../', __FILE__)
  end

  def self.mock(*args, &block)
    Fauxhai::Mocker.new(*args, &block)
  end

  def self.fetch(*args, &block)
    Fauxhai::Fetcher.new(*args, &block)
  end
end

Switch these to autoloads to avoid loading net-ssh unless you actually use the Fetcher system.
Switch these to autoloads to avoid loading net-ssh unless you actually use the Fetcher system.