buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [33/50] git commit: Ensure that the target file to download to does not exist
Date Thu, 31 Jul 2014 05:12:47 GMT
Ensure that the target file to download to does not exist

git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1537929 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/8cbf73b5
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/8cbf73b5
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/8cbf73b5

Branch: refs/heads/master
Commit: 8cbf73b57e69367bf94f28962b231d4aafa211d7
Parents: ec23c53
Author: Peter Donald <donaldp@apache.org>
Authored: Fri Nov 1 13:25:18 2013 +0000
Committer: Peter Donald <donaldp@apache.org>
Committed: Fri Nov 1 13:25:18 2013 +0000

----------------------------------------------------------------------
 spec/core/transport_spec.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/8cbf73b5/spec/core/transport_spec.rb
----------------------------------------------------------------------
diff --git a/spec/core/transport_spec.rb b/spec/core/transport_spec.rb
index fd11517..31e8b03 100644
--- a/spec/core/transport_spec.rb
+++ b/spec/core/transport_spec.rb
@@ -19,9 +19,10 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers')
 
 describe URI, '#download' do
   before do
-    write @source = 'source', @content = 'Just a file'
-    @uri = URI(URI.escape("file://#{File.expand_path(@source)}"))
-    @target = 'target'
+    write @source = File.expand_path('source'), @content = 'A file to download'
+    @uri = URI(URI.escape("file://#{@source}"))
+    @target = File.expand_path('target')
+    rm_f @target
   end
 
   it 'should download file if found' do


Mime
View raw message