Autoload errors. If nothing bad happens, all those error classes don't use any memory :)
This commit is contained in:
parent
39663f6f11
commit
a7197b3566
|
@ -1,14 +1,14 @@
|
||||||
require 'json'
|
require 'json'
|
||||||
require 'i18n'
|
require 'i18n'
|
||||||
require 'virtualbox'
|
require 'virtualbox'
|
||||||
require 'vagrant/errors'
|
|
||||||
require 'vagrant/util/glob_loader'
|
require 'vagrant/util/glob_loader'
|
||||||
|
|
||||||
module Vagrant
|
module Vagrant
|
||||||
# TODO: Move more classes over to the autoload model. We'll
|
# TODO: Move more classes over to the autoload model. We'll
|
||||||
# start small, but slowly move everything over.
|
# start small, but slowly move everything over.
|
||||||
|
|
||||||
autoload :CLI, 'vagrant/cli'
|
autoload :CLI, 'vagrant/cli'
|
||||||
|
autoload :Errors, 'vagrant/errors'
|
||||||
|
|
||||||
module Command
|
module Command
|
||||||
autoload :Base, 'vagrant/command/base'
|
autoload :Base, 'vagrant/command/base'
|
||||||
|
|
|
@ -67,12 +67,6 @@ class ActionWardenTest < Test::Unit::TestCase
|
||||||
@instance.expects(:begin_rescue)
|
@instance.expects(:begin_rescue)
|
||||||
assert_raises(RuntimeError) { @instance.call(new_env) }
|
assert_raises(RuntimeError) { @instance.call(new_env) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_env_with_error
|
|
||||||
env = new_env
|
|
||||||
env.error!(:foo)
|
|
||||||
env
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "recover" do
|
context "recover" do
|
||||||
|
|
Loading…
Reference in New Issue