Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
* test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each test…
Browse files Browse the repository at this point in the history
…. [ruby-dev:22045]

* test/fileutils/test_nowrite.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
aamine committed Nov 25, 2003
1 parent a3388b6 commit 0452420
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Tue Nov 25 18:13:30 2003 Minero Aoki <[email protected]>

* test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each
test. [ruby-dev:22045]

* test/fileutils/test_nowrite.rb: ditto.

Tue Nov 25 17:52:11 2003 Tanaka Akira <[email protected]>

* lib/open-uri.rb (URI::Generic#find_proxy): use http_proxy under CGI
Expand Down
6 changes: 5 additions & 1 deletion test/fileutils/test_fileutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
$:.unshift File.dirname(__FILE__)

require 'fileutils'
require 'test/unit'
require 'fileasserts'
require 'tmpdir'
require 'test/unit'


def have_drive_letter?
Expand Down Expand Up @@ -43,6 +44,8 @@ def my_rm_rf( path )
end

def setup
@prevdir = Dir.pwd
Dir.chdir Dir.tmpdir
my_rm_rf 'data'; Dir.mkdir 'data'
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
prepare_data_file
Expand All @@ -52,6 +55,7 @@ def setup
def teardown
my_rm_rf 'data'
my_rm_rf 'tmp'
Dir.chdir @prevdir
end


Expand Down
6 changes: 5 additions & 1 deletion test/fileutils/test_nowrite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
$:.unshift File.dirname(__FILE__)

require 'fileutils'
require 'test/unit'
require 'fileasserts'
require 'tmpdir'
require 'test/unit'


class TestNoWrite < Test::Unit::TestCase
Expand All @@ -25,6 +26,8 @@ def my_rm_rf( path )
COPY = 'data/copy'

def setup
@prevdir = Dir.pwd
Dir.chdir Dir.tmpdir
my_rm_rf 'date'; Dir.mkdir 'data'
my_rm_rf 'tmp'; Dir.mkdir 'tmp'
File.open(SRC, 'w') {|f| f.puts 'dummy' }
Expand All @@ -34,6 +37,7 @@ def setup
def teardown
my_rm_rf 'data'
my_rm_rf 'tmp'
Dir.chdir @prevdir
end

def test_cp
Expand Down

0 comments on commit 0452420

Please sign in to comment.