Nit-pick test formatting. No code changes.
This commit is contained in:
parent
be47236c37
commit
94be71e527
|
@ -3,14 +3,14 @@ require File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper')
|
||||||
class AddBoxActionTest < Test::Unit::TestCase
|
class AddBoxActionTest < Test::Unit::TestCase
|
||||||
setup do
|
setup do
|
||||||
@runner, @vm, @action = mock_action(Vagrant::Actions::Box::Add)
|
@runner, @vm, @action = mock_action(Vagrant::Actions::Box::Add)
|
||||||
@runner.stubs(:directory).returns("foo")
|
|
||||||
File.stubs(:exists?).returns(false)
|
|
||||||
mock_config
|
mock_config
|
||||||
end
|
end
|
||||||
|
|
||||||
context "sub-actions" do
|
context "prepare" do
|
||||||
setup do
|
setup do
|
||||||
@default_order = [Vagrant::Actions::Box::Download, Vagrant::Actions::Box::Unpackage]
|
@default_order = [Vagrant::Actions::Box::Download, Vagrant::Actions::Box::Unpackage]
|
||||||
|
@runner.stubs(:directory).returns("foo")
|
||||||
|
File.stubs(:exists?).returns(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_action_expectations
|
def setup_action_expectations
|
||||||
|
@ -20,14 +20,12 @@ class AddBoxActionTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
should "do the proper actions by default" do
|
should "setup the proper sequence of actions" do
|
||||||
setup_action_expectations
|
setup_action_expectations
|
||||||
@action.prepare
|
@action.prepare
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
context "providing a name for a base that exists" do
|
should "result in an action exception if the box already exists" do
|
||||||
should "result in an action exception" do
|
|
||||||
File.expects(:exists?).once.returns(true)
|
File.expects(:exists?).once.returns(true)
|
||||||
@runner.expects(:name).twice.returns('foo')
|
@runner.expects(:name).twice.returns('foo')
|
||||||
@runner.expects(:add_action).never
|
@runner.expects(:add_action).never
|
||||||
|
|
Loading…
Reference in New Issue