From 905c32dcc9441e6f7a499c69b24b79d8173b295e Mon Sep 17 00:00:00 2001 From: Thibaud Guillaume-Gentil Date: Sat, 3 Sep 2011 14:15:54 +0200 Subject: [PATCH] Add listener spec for chmod modification --- spec/support/listener_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/support/listener_helper.rb b/spec/support/listener_helper.rb index 38388e5..6dd2f9d 100644 --- a/spec/support/listener_helper.rb +++ b/spec/support/listener_helper.rb @@ -61,6 +61,16 @@ shared_examples_for 'a listener that reacts to #on_change' do |rest_delay| results.should =~ ['spec/fixtures/folder1/file1.txt'] end + it "catches a single file chmod update" do + file = @fixture_path.join("folder1/file1.txt") + File.exists?(file).should be_true + File.chmod(0775, file) + start + File.chmod(0777, file) + stop + results.should =~ ['spec/fixtures/folder1/file1.txt'] + end + it "catches a dotfile update" do file = @fixture_path.join(".dotfile") File.exists?(file).should be_true