Tests for the init change to not use ftools

This commit is contained in:
Mitchell Hashimoto 2010-03-09 10:52:06 -08:00
parent de18f1e4a6
commit 0c24f0e68f
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ class CommandsTest < Test::Unit::TestCase
context "init" do context "init" do
setup do setup do
File.stubs(:copy) FileUtils.stubs(:cp)
@rootfile_path = File.join(Dir.pwd, Vagrant::Env::ROOTFILE_NAME) @rootfile_path = File.join(Dir.pwd, Vagrant::Env::ROOTFILE_NAME)
@template_path = File.join(PROJECT_ROOT, "templates", Vagrant::Env::ROOTFILE_NAME) @template_path = File.join(PROJECT_ROOT, "templates", Vagrant::Env::ROOTFILE_NAME)
end end
@ -25,7 +25,7 @@ class CommandsTest < Test::Unit::TestCase
should "copy the templated rootfile to the current path" do should "copy the templated rootfile to the current path" do
File.expects(:exist?).with(@rootfile_path).returns(false) File.expects(:exist?).with(@rootfile_path).returns(false)
File.expects(:copy).with(@template_path, @rootfile_path).once FileUtils.expects(:cp).with(@template_path, @rootfile_path).once
Vagrant::Commands.init Vagrant::Commands.init
end end
end end