Fixed hobo dir tests to work even if the dir is already present
This commit is contained in:
parent
4f72534121
commit
c59b189bfa
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue