Skip to content

Commit 13f302a

Browse files
committed
(temp) Try to spec test without sleep(1)
1 parent 37c4da9 commit 13f302a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spec/unit/face/generate_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,7 @@ module Puppet
226226
Puppet::FileSystem.mkpath(puppet_x_lib)
227227
genface.types
228228
stats_before = [Puppet::FileSystem.stat(File.join(outputdir, 'test1.pp')), Puppet::FileSystem.stat(File.join(outputdir, 'test2.pp'))]
229-
# Sorry. The sleep is needed because Puppet::FileSystem.touch(<path>, :mtime => Time.now + 1000) doesn't work on Windows.
230-
sleep(1)
231-
Puppet::FileSystem.touch(puppet_x_lib)
229+
Puppet::FileSystem.touch(puppet_x_lib, :mtime => Time.now + 1000)
232230
genface.types
233231
stats_after = [Puppet::FileSystem.stat(File.join(outputdir, 'test1.pp')), Puppet::FileSystem.stat(File.join(outputdir, 'test2.pp'))]
234232
expect(stats_before <=> stats_after).to eq(-1)

0 commit comments

Comments
 (0)