class Berkshelf::Cli::Runner

than spawning a new Ruby process for each test.
is a requirement to perform in-process testing with Aruba. In process testing is much faster
@note the arity of {#initialize} and {#execute!} are extremely important for testing purposes. It
start the CLI.
This is the main entry point for the CLI. It exposes the method {#execute!} to

def execute!

def execute!
  $stdin  = @stdin
  $stdout = @stdout
  $stderr = @stderr
  Berkshelf::Cli.start(@argv)
  @kernel.exit(0)
rescue Berkshelf::BerkshelfError => e
  Berkshelf.ui.error e
  Berkshelf.ui.error "\t" + e.backtrace.join("\n\t") if ENV["BERKSHELF_DEBUG"]
  @kernel.exit(e.status_code)
rescue => e
  Berkshelf.ui.error "#{e.class} #{e}"
  Berkshelf.ui.error "\t" + e.backtrace.join("\n\t") if ENV["BERKSHELF_DEBUG"]
  @kernel.exit(47)
end

def initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)

def initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
  @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
end