Add spec helper that waits for the next second to begin (instead of sleeping for a whole second)
This commit is contained in:
parent
52b32fb396
commit
4d01144bf4
@ -122,7 +122,7 @@ describe "Directories" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "updates the timestamp of the directory" do
|
it "updates the timestamp of the directory" do
|
||||||
sleep 1
|
wait_a_second
|
||||||
put "/jimmy/tasks/home/trash", "take out the trash"
|
put "/jimmy/tasks/home/trash", "take out the trash"
|
||||||
|
|
||||||
@directory.reload
|
@directory.reload
|
||||||
|
@ -43,4 +43,9 @@ def purge_all_buckets
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def wait_a_second
|
||||||
|
now = Time.now.to_i
|
||||||
|
while Time.now.to_i == now; end
|
||||||
|
end
|
||||||
|
|
||||||
alias context describe
|
alias context describe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user