Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Ensure that the target file to download to does not exist
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/buildr/trunk@1537929 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
realityforge committed Nov 1, 2013
1 parent 1216bbb commit bffa60c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/core/transport_spec.rb
Expand Up @@ -19,9 +19,10 @@

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
Expand Down

0 comments on commit bffa60c

Please sign in to comment.