Sha256: 125f91341c8f7dc46f327b6c7a83f889fab4d6c2cfb5386df060be31ab4244aa

Contents?: true

Size: 956 Bytes

Versions: 24

Compression:

Stored size: 956 Bytes

Contents

require 'spec_helper'

describe S3Website::Uploader do
  context '#load_all_local_files' do
    let(:files) {
      S3Website::Uploader.send(:load_all_local_files,
                                'spec/sample_files/hyde_site/_site')
    }

    it 'loads regular files' do
      files.should include('css/styles.css')
      files.should include('index.html')
    end

    it 'loads also dotfiles' do
      files.should include('.vimrc')
    end
  end

  context "#build_list_of_files_to_delete" do
    it "ignores files which match a regular expression" do
      files_to_delete = S3Website::Uploader.build_list_of_files_to_delete(["a", "b", "ignored"], ["a"], "ignored")
      files_to_delete.should eq ["b"]
    end
    it "does not ignore when you don't provide an ignored regex" do
      files_to_delete = S3Website::Uploader.build_list_of_files_to_delete(["a", "b", "ignored"], ["a"])
      files_to_delete.should eq ["b", "ignored"]
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
s3_website-1.5.0 spec/lib/uploader_spec.rb
s3_website-1.4.5 spec/lib/uploader_spec.rb
s3_website-1.4.4 spec/lib/uploader_spec.rb
s3_website-1.4.3 spec/lib/uploader_spec.rb
s3_website-1.4.2 spec/lib/uploader_spec.rb
s3_website-1.4.1 spec/lib/uploader_spec.rb
s3_website-1.4.0 spec/lib/uploader_spec.rb
s3_website-1.3.2 spec/lib/uploader_spec.rb
s3_website-1.3.1 spec/lib/uploader_spec.rb
s3_website-1.3.0 spec/lib/uploader_spec.rb
s3_website-1.2.1 spec/lib/uploader_spec.rb
s3_website-1.2.0 spec/lib/uploader_spec.rb
s3_website-1.1.2 spec/lib/uploader_spec.rb
s3_website-1.1.1 spec/lib/uploader_spec.rb
s3_website-1.1.0 spec/lib/uploader_spec.rb
s3_website-1.0.3 spec/lib/uploader_spec.rb
s3_website-1.0.2 spec/lib/uploader_spec.rb
s3_website-1.0.1 spec/lib/uploader_spec.rb
s3_website-1.0.0 spec/lib/uploader_spec.rb
s3_website-0.4.0 spec/lib/uploader_spec.rb