1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/storage/models/files_tests.rb

27 lines
607 B
Ruby
Raw Normal View History

for provider, config in storage_providers
2010-12-29 21:12:51 -05:00
Shindo.tests("Storage[:#{provider}] | files", [provider]) do
2010-12-29 21:12:51 -05:00
if !Fog.mocking? || config[:mocked]
2010-12-29 21:12:51 -05:00
file_attributes = {
:key => 'fog_files_tests',
:body => lorem_file
}.merge!(config[:file_attributes] || {})
directory_attributes = {
:key => 'fogfilestests'
}.merge!(config[:directory_attributes] || {})
2010-12-29 21:12:51 -05:00
@directory = Fog::Storage[provider].directories.create(directory_attributes)
collection_tests(@directory.files, file_attributes, config[:mocked])
@directory.destroy
end
2010-12-29 21:12:51 -05:00
end
end