Sha256: 47271b9849cf548e1d61306ee5ee333264cb35b40b4d74572b3cff061c5cecf6

Contents?: true

Size: 1.21 KB

Versions: 55

Compression:

Stored size: 1.21 KB

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'

describe 'Fog::AWS::S3::Directories' do

  describe "#all" do

    it "should include persisted directories" do
      @directory = AWS[:s3].directories.create(:key => 'fogdirectorykey')
      AWS[:s3].directories.all.map {|directory| @directory.key}.should include('fogdirectorykey')
      @directory.destroy
    end

  end

  describe "#create" do

    it "should exist on s3" do
      directory = AWS[:s3].directories.create(:key => 'fogdirectorykey')
      AWS[:s3].directories.get(directory.key).should_not be_nil
      directory.destroy
    end

  end

  describe "#get" do

    it "should return a Fog::AWS::S3::Directory if a matching directory exists" do
      directory = AWS[:s3].directories.create(:key => 'fogdirectorykey')
      get = AWS[:s3].directories.get('fogdirectorykey')
      directory.attributes.should == get.attributes
      directory.destroy
    end

    it "should return nil if no matching directory exists" do
      AWS[:s3].directories.get('fognotadirectory').should be_nil
    end

  end

  describe "#reload" do

    it "should reload data" do
      directories = AWS[:s3].directories
      directories.should == directories.reload
    end

  end

end

Version data entries

55 entries across 55 versions & 2 rubygems

Version Path
fog-0.2.30 spec/aws/models/s3/directories_spec.rb
fog-0.2.28 spec/aws/models/s3/directories_spec.rb
fog-0.2.27 spec/aws/models/s3/directories_spec.rb
fog-0.2.26 spec/aws/models/s3/directories_spec.rb
fog-0.2.25 spec/aws/models/s3/directories_spec.rb
fog-0.2.24 spec/aws/models/s3/directories_spec.rb
tecnh-fog-0.2.23.vpc spec/aws/models/s3/directories_spec.rb
fog-0.2.23 spec/aws/models/s3/directories_spec.rb
fog-0.2.22 spec/aws/models/s3/directories_spec.rb
fog-0.2.21 spec/aws/models/s3/directories_spec.rb
fog-0.2.20 spec/aws/models/s3/directories_spec.rb
fog-0.2.19 spec/aws/models/s3/directories_spec.rb
fog-0.2.18 spec/aws/models/s3/directories_spec.rb
fog-0.2.17 spec/aws/models/s3/directories_spec.rb
fog-0.2.16 spec/aws/models/s3/directories_spec.rb
fog-0.2.15 spec/aws/models/s3/directories_spec.rb
fog-0.2.14 spec/aws/models/s3/directories_spec.rb
fog-0.2.13 spec/aws/models/s3/directories_spec.rb
fog-0.2.12 spec/aws/models/s3/directories_spec.rb
fog-0.2.11 spec/aws/models/s3/directories_spec.rb