Don't clear registered actions hash in tests ever
This commit is contained in:
parent
f85401481b
commit
1a5836ee23
|
@ -155,10 +155,6 @@ class ActionBuilderTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
context "converting to an app" do
|
||||
teardown do
|
||||
Vagrant::Action.actions.clear
|
||||
end
|
||||
|
||||
should "make non-classes lambdas" do
|
||||
env = Vagrant::Action::Environment.new(nil)
|
||||
env.expects(:foo).once
|
||||
|
|
|
@ -7,7 +7,7 @@ class ActionTest < Test::Unit::TestCase
|
|||
|
||||
context "with a class" do
|
||||
teardown do
|
||||
@klass.actions.clear
|
||||
@klass.actions.delete(:foo)
|
||||
end
|
||||
|
||||
should "be able to register an action" do
|
||||
|
@ -27,10 +27,6 @@ class ActionTest < Test::Unit::TestCase
|
|||
@instance = @klass.new(mock_environment)
|
||||
end
|
||||
|
||||
teardown do
|
||||
@klass.actions.clear
|
||||
end
|
||||
|
||||
should "raise an exception if a nil action is given" do
|
||||
assert_raises(ArgumentError) { @instance.run(nil) }
|
||||
assert_raises(ArgumentError) { @instance.run(:dontexist) }
|
||||
|
@ -74,6 +70,7 @@ class ActionTest < Test::Unit::TestCase
|
|||
|
||||
@klass.register(:call, callable)
|
||||
@instance.run(:call)
|
||||
@klass.actions.delete(:call)
|
||||
end
|
||||
|
||||
should "run the given class if a class is given" do
|
||||
|
|
Loading…
Reference in New Issue