You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/05/23 17:40:30 UTC

svn commit: r947433 - /buildr/trunk/spec/core/test_spec.rb

Author: boisvert
Date: Sun May 23 15:40:30 2010
New Revision: 947433

URL: http://svn.apache.org/viewvc?rev=947433&view=rev
Log:
Fix failing tests on Windows;   Windows doesn't like File.utime(atime, mtime, '.')

Modified:
    buildr/trunk/spec/core/test_spec.rb

Modified: buildr/trunk/spec/core/test_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/test_spec.rb?rev=947433&r1=947432&r2=947433&view=diff
==============================================================================
--- buildr/trunk/spec/core/test_spec.rb (original)
+++ buildr/trunk/spec/core/test_spec.rb Sun May 23 15:40:30 2010
@@ -665,7 +665,8 @@ describe Buildr::TestTask, '#invoke' do
       target = ['classes/Foo.class', 'resources/config.xml', 'test/classes/FooTest.class', 'test/resources/config-test.xml'].map { |f| File.join('target', f) }
       files = ['buildfile'] + src + target
       files.each { |file| write file }
-      (files + files.map { |file| file.pathmap('%d') }).each { |file| File.utime(@a_second_ago, @a_second_ago, file) }
+      dirs = (src + target).map { |file| file.pathmap('%d') }
+      (files + dirs ).each { |path| File.utime(@a_second_ago, @a_second_ago, path) }
       touch_last_successful_test_run test_task, @a_second_ago
     end