2011-01-03 14:23:51 -05:00
|
|
|
for provider, config in storage_providers
|
2010-11-16 18:31:34 -05:00
|
|
|
|
2011-01-03 14:23:51 -05:00
|
|
|
Shindo.tests("#{provider}::Storage | directory", [provider.to_s.downcase]) do
|
2010-11-03 21:17:20 -04:00
|
|
|
|
2011-01-03 18:38:20 -05:00
|
|
|
directory_attributes = {
|
2011-01-03 14:23:51 -05:00
|
|
|
:key => 'fogdirectorytests'
|
2011-01-03 16:36:31 -05:00
|
|
|
}.merge!(config[:directory_attributes] || {})
|
2010-11-03 21:17:20 -04:00
|
|
|
|
2011-01-03 18:38:20 -05:00
|
|
|
model_tests(provider[:storage].directory, directory_attributes, config[:mocked]) do
|
2011-01-03 14:23:51 -05:00
|
|
|
|
|
|
|
tests("#public=(true)").succeeds do
|
|
|
|
pending if Fog.mocking? && !config[:mocked]
|
|
|
|
@instance.public=(true)
|
|
|
|
end
|
|
|
|
|
2011-02-22 19:36:15 -05:00
|
|
|
tests('responds_to(:public_url)') do
|
|
|
|
pending if Fog.mocking? && !config[:mocked]
|
2011-01-03 14:23:51 -05:00
|
|
|
@instance.responds_to(:public_url)
|
|
|
|
end
|
2010-11-05 14:37:12 -04:00
|
|
|
|
2010-11-16 18:31:34 -05:00
|
|
|
end
|
2010-11-05 14:37:12 -04:00
|
|
|
|
2010-11-03 21:17:20 -04:00
|
|
|
end
|
|
|
|
|
2010-11-11 14:54:55 -05:00
|
|
|
end
|