Sha256: f3acd442753b20e314b32bd818dff0e6fdd9a7ebc4f15c80107efb51179fdd44

Contents?: true

Size: 816 Bytes

Versions: 39

Compression:

Stored size: 816 Bytes

Contents

Shindo.tests('Fog::Rackspace::Storage | directories', ['rackspace']) do

  @service = Fog::Storage[:rackspace]

  begin
    @name = "fog-directories-test-#{Time.now.to_i.to_s}"
    @filename = 'lorem.txt'
    @dir = @service.directories.create :key => @name, :metadata => {:fog_test => true}
    @file = @dir.files.create :key => @filename, :body => lorem_file

    tests('#get').succeeds do
      instance = @service.directories.get @name
      returns(false) { instance.nil? }
      returns('true') { instance.metadata[:fog_test] }
      returns(@name) { instance.key }
      returns(1) { instance.count }
      returns( Fog::Storage.get_body_size(lorem_file)) {instance.bytes }
      returns(@filename) { instance.files.first.key }
    end

  ensure
    @file.destroy if @file
    @dir.destroy if @dir
  end

end

Version data entries

39 entries across 37 versions & 6 rubygems

Version Path
fog-rackspace-0.1.6 tests/rackspace/models/storage/directories_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/tests/rackspace/models/storage/directories_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/tests/rackspace/models/storage/directories_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.5 tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.4 tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.3 tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.2 tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.1 tests/rackspace/models/storage/directories_tests.rb
fog-rackspace-0.1.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.37.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.36.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.35.0 tests/rackspace/models/storage/directories_tests.rb
fog-2.0.0.pre.0 tests/rackspace/models/storage/directories_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/rackspace/models/storage/directories_tests.rb
fog-1.34.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.33.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.32.0 tests/rackspace/models/storage/directories_tests.rb
fog-1.31.0 tests/rackspace/models/storage/directories_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/models/storage/directories_tests.rb