Sha256: 7741051b3501b783145b8711e9459bd0fe28284907f0daa0ba4869975619a9d9

Contents?: true

Size: 1.04 KB

Versions: 16

Compression:

Stored size: 1.04 KB

Contents

for provider, config in storage_providers

  Shindo.tests("#{provider}::Storage | file", [provider.to_s.downcase]) do

    file_attributes = {
      :key => 'fog_file_tests',
      :body => lorem_file,
      :public => true
    }.merge!(config[:file_attributes] || {})

    if !Fog.mocking? || config[:mocked]

      directory_attributes = {
        :key => 'fogfilestests'
      }.merge!(config[:directory_attributes] || {})

      @directory = provider[:storage].directories.create(directory_attributes)

      model_tests(@directory.files, file_attributes, config[:mocked]) do

        responds_to(:public_url)

        tests("#public=(true)").succeeds do
          pending if Fog.mocking? && !config[:mocked]
          @instance.public=(true)
        end

        test("@instance.public_url.nil? || Excon.get(@instance.public_url).body == lorem_file.read") do
          pending if Fog.mocking?
          @instance.public_url.nil? || Excon.get(@instance.public_url).body == lorem_file.read
        end

      end

      @directory.destroy

    end

  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
fog-0.8.1 tests/storage/models/file_tests.rb
fog-0.8.0 tests/storage/models/file_tests.rb
fog-0.7.2 tests/storage/models/file_tests.rb
fog-0.7.1 tests/storage/models/file_tests.rb
fog-0.7.0 tests/storage/models/file_tests.rb
fog-0.6.0 tests/storage/models/file_tests.rb
fog-0.5.3 tests/storage/models/file_tests.rb
fog-0.5.2 tests/storage/models/file_tests.rb
fog-0.5.1 tests/storage/models/file_tests.rb
fog-0.5.0 tests/storage/models/file_tests.rb
phpfog-fog-0.4.1.3 tests/storage/models/file_tests.rb
phpfog-fog-0.4.1.2 tests/storage/models/file_tests.rb
phpfog-fog-0.4.1.1 tests/storage/models/file_tests.rb
phpfog-fog-0.4.1 tests/storage/models/file_tests.rb
fog-0.4.1 tests/storage/models/file_tests.rb
fog-0.4.0 tests/storage/models/file_tests.rb