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

@ -24,16 +24,17 @@ class EnvTest < Test::Unit::TestCase
assert_equal file, Hobo::Env::CONFIG.keys.first
{ :setting => 1 }
end
assert_equal Hobo::Config.settings.setting, 1
assert_equal Hobo::Config.settings.setting, 1
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