very subtle, autospec was not using inotify if guard was already running
This commit is contained in:
parent
560bf4dcef
commit
acc4f73ba0
|
@ -94,9 +94,9 @@ class Autospec::Runner
|
||||||
begin
|
begin
|
||||||
require 'rb-inotify'
|
require 'rb-inotify'
|
||||||
n = INotify::Notifier.new
|
n = INotify::Notifier.new
|
||||||
FileUtils.touch('tmp/test_polling')
|
FileUtils.touch('./tmp/test_polling')
|
||||||
|
|
||||||
n.watch("./tmp/test_polling"){works = true }
|
n.watch("./tmp", :delete){ works = true }
|
||||||
quit = false
|
quit = false
|
||||||
Thread.new do
|
Thread.new do
|
||||||
while !works && !quit
|
while !works && !quit
|
||||||
|
@ -106,7 +106,7 @@ class Autospec::Runner
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
sleep 0.01
|
sleep 0.01
|
||||||
File.unlink('tmp/test_polling')
|
File.unlink('./tmp/test_polling')
|
||||||
|
|
||||||
wait_for(100) { works }
|
wait_for(100) { works }
|
||||||
n.stop
|
n.stop
|
||||||
|
|
|
@ -352,17 +352,12 @@ describe Post do
|
||||||
post.reload
|
post.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not update cached_version' do
|
it 'causes no update' do
|
||||||
post.cached_version.should == 1
|
post.cached_version.should == 1
|
||||||
end
|
|
||||||
|
|
||||||
it 'does not create a new version' do
|
|
||||||
post.all_versions.size.should == 1
|
post.all_versions.size.should == 1
|
||||||
end
|
|
||||||
|
|
||||||
it "doesn't change the last_version_at" do
|
|
||||||
post.last_version_at.should == first_version_at
|
post.last_version_at.should == first_version_at
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'revision much later' do
|
describe 'revision much later' do
|
||||||
|
|
Loading…
Reference in New Issue