spec/lib/uploader_spec.rb in s3_website-1.5.0 vs spec/lib/uploader_spec.rb in s3_website-1.6.0
- old
+ new
@@ -15,14 +15,21 @@
it 'loads also dotfiles' do
files.should include('.vimrc')
end
end
- context "#build_list_of_files_to_delete" do
+ 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