Fixed hobo dir tests to work even if the dir is already present

This commit is contained in:
Mitchell Hashimoto 2010-01-22 00:22:11 -08:00
parent 4f72534121
commit c59b189bfa
1 changed files with 3 additions and 2 deletions

View File

@ -28,12 +28,13 @@ class EnvTest < Test::Unit::TestCase
end
end
#TODO Expectations will fail if .hobo dir is present
def dir_expectations
File.expects(:exists?).times(Hobo::Env::ENSURE[:dirs].length).returns(false)
Dir.expects(:mkdir).times(Hobo::Env::ENSURE[:dirs].length).returns nil
end
def file_expectations
File.expects(:exists?).times(Hobo::Env::ENSURE[:files].length).returns(false)
File.expects(:copy).times(Hobo::Env::ENSURE[:files].length)
end
end