Sha256: 887f72be961296f2a31a46876ec41c52008d8c1c8ae989526b85958e5de541bb

Contents?: true

Size: 559 Bytes

Versions: 8

Compression:

Stored size: 559 Bytes

Contents

require File.join(File.dirname(__FILE__),'../../spec_helper')

describe IMW::Schemes::S3 do

  describe 'manipulating S3 paths' do
    before do
      @resource = IMW::Resource.new('s3://mybucket/foobar/foo.txt')
    end

    it "should set the bucket" do
      @resource.bucket.should == 'mybucket'
    end

    it "can generate an S3N url" do
      @resource.s3n_url.should == 's3n://mybucket/foobar/foo.txt'
    end

    it "can join path segments" do
      @resource.join('a', 'b/c').to_s.should == File.join(@resource.to_s, 'a/b/c')
    end
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
imw-0.2.15 spec/imw/schemes/s3_spec.rb
imw-0.2.14 spec/imw/schemes/s3_spec.rb
imw-0.2.13 spec/imw/schemes/s3_spec.rb
imw-0.2.12 spec/imw/schemes/s3_spec.rb
imw-0.2.11 spec/imw/schemes/s3_spec.rb
imw-0.2.10 spec/imw/schemes/s3_spec.rb
imw-0.2.9 spec/imw/schemes/s3_spec.rb
imw-0.2.8 spec/imw/schemes/s3_spec.rb