Ignore existing directory when creating on local storage
This commit is contained in:
parent
cae2af0806
commit
9fc461f0f8
|
@ -40,7 +40,7 @@ module Fog
|
|||
def save
|
||||
requires :key
|
||||
|
||||
Dir.mkdir(path)
|
||||
FileUtils.mkpath(path)
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
Shindo.tests('Storage[:local] | directory', ["local"]) do
|
||||
|
||||
pending if Fog.mocking?
|
||||
|
||||
before do
|
||||
@options = { :local_root => '~/.fog' }
|
||||
end
|
||||
|
||||
tests('save') do
|
||||
returns(true) do
|
||||
connection = Fog::Storage::Local.new(@options)
|
||||
connection.directories.create(:key => 'directory')
|
||||
connection.directories.create(:key => 'directory')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue