mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/fileutils/test_fileutils.rb: chdir Dir.tmpdir before each test. [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
This commit is contained in:
parent
a3388b68b7
commit
0452420e4c
3 changed files with 17 additions and 2 deletions
|
@ -5,8 +5,9 @@
|
|||
$:.unshift File.dirname(__FILE__)
|
||||
|
||||
require 'fileutils'
|
||||
require 'test/unit'
|
||||
require 'fileasserts'
|
||||
require 'tmpdir'
|
||||
require 'test/unit'
|
||||
|
||||
|
||||
def have_drive_letter?
|
||||
|
@ -43,6 +44,8 @@ class TestFileUtils < Test::Unit::TestCase
|
|||
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
|
||||
|
@ -52,6 +55,7 @@ class TestFileUtils < Test::Unit::TestCase
|
|||
def teardown
|
||||
my_rm_rf 'data'
|
||||
my_rm_rf 'tmp'
|
||||
Dir.chdir @prevdir
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue