Add listener spec for chmod modification

This commit is contained in:
Thibaud Guillaume-Gentil 2011-09-03 14:15:54 +02:00
parent 45ba095093
commit 905c32dcc9

View File

@ -61,6 +61,16 @@ shared_examples_for 'a listener that reacts to #on_change' do |rest_delay|
results.should =~ ['spec/fixtures/folder1/file1.txt'] results.should =~ ['spec/fixtures/folder1/file1.txt']
end 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 it "catches a dotfile update" do
file = @fixture_path.join(".dotfile") file = @fixture_path.join(".dotfile")
File.exists?(file).should be_true File.exists?(file).should be_true