must not use touch on Linux
This commit is contained in:
parent
bc740d725f
commit
7b95eeb275
@ -46,6 +46,8 @@ describe Guard::Linux do
|
||||
|
||||
it_should_behave_like "a listener that reacts to #on_change"
|
||||
it_should_behave_like "a listener scoped to a specific directory"
|
||||
|
||||
# Fun fact: File.touch seems not to be enough on Linux to trigger a modify event
|
||||
|
||||
it "doesn't process a change when it is stopped" do
|
||||
@listener = described_class.new
|
||||
|
@ -53,7 +53,7 @@ shared_examples_for 'a listener that reacts to #on_change' do
|
||||
file = @fixture_path.join("folder1/file1.txt")
|
||||
File.exists?(file).should be_true
|
||||
start
|
||||
FileUtils.touch file
|
||||
File.open(file, 'w') {|f| f.write('') }
|
||||
stop
|
||||
results.should =~ ['spec/fixtures/folder1/file1.txt']
|
||||
end
|
||||
@ -64,8 +64,8 @@ shared_examples_for 'a listener that reacts to #on_change' do
|
||||
File.exists?(file1).should be_true
|
||||
File.exists?(file2).should be_true
|
||||
start
|
||||
FileUtils.touch file1
|
||||
FileUtils.touch file2
|
||||
File.open(file1, 'w') {|f| f.write('') }
|
||||
File.open(file2, 'w') {|f| f.write('') }
|
||||
stop
|
||||
results.should =~ ['spec/fixtures/folder1/file1.txt', 'spec/fixtures/folder1/folder2/file2.txt']
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user