Skip to content

Commit f9bc99a

Browse files
tfheendanielsdeleo
authored andcommitted
Fix backup test to work in all time zones.
1 parent eef6029 commit f9bc99a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎chef/spec/unit/provider/file_spec.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@
331331
FileUtils.stub!(:mkdir_p).and_return(true)
332332
FileUtils.stub!(:rm).and_return(true)
333333
File.stub!(:exist?).and_return(true)
334-
Time.stub!(:now).and_return(Time.at(1272147455))
335-
FileUtils.should_receive(:cp).with("/tmp/s-20080705111233", "/some_prefix/tmp/s-20080705111233.chef-20100424151735", {:preserve => true}).and_return(true)
334+
Time.stub!(:now).and_return(Time.at(1272147455).getgm)
335+
FileUtils.should_receive(:cp).with("/tmp/s-20080705111233", "/some_prefix/tmp/s-20080705111233.chef-20100424221735", {:preserve => true}).and_return(true)
336336
@provider.backup
337337
end
338338

0 commit comments

Comments
 (0)