Sha256: 314e68ba2f8e14725f17bb8377c83eeb00cdde0e8c81839499f5146bda131479

Contents?: true

Size: 789 Bytes

Versions: 13

Compression:

Stored size: 789 Bytes

Contents

def file_tests(connection, params = {}, mocks_implemented = true)

  params = {:key => 'fog_file_tests', :body => lorem_file, :public => true}.merge!(params)

  if !Fog.mocking? || mocks_implemented
    @directory = connection.directories.create(:key => 'fogfilestests')

    model_tests(@directory.files, params, mocks_implemented) do

      responds_to(:public_url)

      tests("#public=(true)").succeeds do
        pending if Fog.mocking? && !mocks_implemented
        @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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-0.3.34 tests/helpers/storage/file_tests.rb
fog-0.3.33 tests/helpers/storage/file_tests.rb
fog-0.3.32 tests/helpers/storage/file_tests.rb
fog-0.3.31 tests/helpers/storage/file_tests.rb
fog-0.3.30 tests/helpers/storage/file_tests.rb
fog-0.3.29 tests/helpers/storage/file_tests.rb
fog-0.3.28 tests/helpers/storage/file_tests.rb
fog-0.3.27 tests/helpers/storage/file_tests.rb
fog-0.3.26 tests/helpers/storage/file_tests.rb
fog-0.3.25 tests/helpers/storage/file_tests.rb
fog-0.3.24 tests/helpers/storage/file_tests.rb
fog-0.3.23 tests/helpers/storage/file_tests.rb
fog-0.3.22 tests/helpers/storage/file_tests.rb