Sha256: 028da727e3dda640b68cefce47f7214b903157bcf7f502b76b696f3a0fed901f

Contents?: true

Size: 1.16 KB

Versions: 38

Compression:

Stored size: 1.16 KB

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 "honoring the ignore_on_server setting" 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 "let's the user specify the regexes in a list" 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

38 entries across 38 versions & 2 rubygems

Version Path
s3_website-1.8.2 spec/lib/uploader_spec.rb
s3_website-1.8.1 spec/lib/uploader_spec.rb
s3_website-1.8.0 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.15 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.14 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.13 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.12 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.11 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.9 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.8 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.7 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.6 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.5 spec/lib/uploader_spec.rb
s3_website-1.7.6 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.4 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.3 spec/lib/uploader_spec.rb
s3_website-1.7.5 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.2 spec/lib/uploader_spec.rb
s3_website_monadic-0.0.1 spec/lib/uploader_spec.rb
s3_website-1.7.4 spec/lib/uploader_spec.rb