Author: donaldp
Date: Fri Nov 1 13:25:18 2013
New Revision: 1537929
URL: http://svn.apache.org/r1537929
Log:
Ensure that the target file to download to does not exist
Modified:
buildr/trunk/spec/core/transport_spec.rb
Modified: buildr/trunk/spec/core/transport_spec.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/spec/core/transport_spec.rb?rev=1537929&r1=1537928&r2=1537929&view=diff
==============================================================================
--- buildr/trunk/spec/core/transport_spec.rb (original)
+++ buildr/trunk/spec/core/transport_spec.rb Fri Nov 1 13:25:18 2013
@@ -19,9 +19,10 @@ require File.expand_path(File.join(File.
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