summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-24 17:44:39 +0000
commit00b4a3f9c4aaf5aa038a9530ec515e1718ae1c42 (patch)
treeb57bc2afea00aa87978f691526dd7adc1b8a067d /test/fileutils
parent48fdf59dcfbb6964d992b6f31d0eb6f023776145 (diff)
* test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index b4ddee0..495a627 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -192,7 +192,7 @@ end
TARGETS.each do |fname|
assert cmp(fname, fname), 'not same?'
end
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
cmp TARGETS[0], TARGETS[0], :undefinedoption => true
}
@@ -225,21 +225,21 @@ end
# src==dest (1) same path
touch 'tmp/cptmp'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
cp 'tmp/cptmp', 'tmp/cptmp'
}
if have_symlink?
# src==dest (2) symlink and its target
File.symlink 'cptmp', 'tmp/cptmp_symlink'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
cp 'tmp/cptmp', 'tmp/cptmp_symlink'
}
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
cp 'tmp/cptmp_symlink', 'tmp/cptmp'
}
# src==dest (3) looped symlink
File.symlink 'symlink', 'tmp/symlink'
- assert_raises(Errno::ELOOP) {
+ assert_raise(Errno::ELOOP) {
cp 'tmp/symlink', 'tmp/symlink'
}
end
@@ -328,31 +328,31 @@ end
mkdir 'tmp/tmpdir'
mkdir_p 'tmp/dest2/tmpdir'
- assert_raises(Errno::EEXIST) {
+ assert_raise(Errno::EEXIST) {
mv 'tmp/tmpdir', 'tmp/dest2'
}
mkdir 'tmp/dest2/tmpdir/junk'
- assert_raises(Errno::EEXIST, "[ruby-talk:124368]") {
+ assert_raise(Errno::EEXIST, "[ruby-talk:124368]") {
mv 'tmp/tmpdir', 'tmp/dest2'
}
# src==dest (1) same path
touch 'tmp/cptmp'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
mv 'tmp/cptmp', 'tmp/cptmp'
}
if have_symlink?
# src==dest (2) symlink and its target
File.symlink 'cptmp', 'tmp/cptmp_symlink'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
mv 'tmp/cptmp', 'tmp/cptmp_symlink'
}
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
mv 'tmp/cptmp_symlink', 'tmp/cptmp'
}
# src==dest (3) looped symlink
File.symlink 'symlink', 'tmp/symlink'
- assert_raises(Errno::ELOOP) {
+ assert_raise(Errno::ELOOP) {
mv 'tmp/symlink', 'tmp/symlink'
}
end
@@ -589,16 +589,16 @@ if have_hardlink?
# src==dest (1) same path
touch 'tmp/cptmp'
- assert_raises(Errno::EEXIST) {
+ assert_raise(Errno::EEXIST) {
ln 'tmp/cptmp', 'tmp/cptmp'
}
if have_symlink?
# src==dest (2) symlink and its target
File.symlink 'cptmp', 'tmp/symlink'
- assert_raises(Errno::EEXIST) {
+ assert_raise(Errno::EEXIST) {
ln 'tmp/cptmp', 'tmp/symlink' # normal file -> symlink
}
- assert_raises(Errno::EEXIST) {
+ assert_raise(Errno::EEXIST) {
ln 'tmp/symlink', 'tmp/cptmp' # symlink -> normal file
}
# src==dest (3) looped symlink
@@ -796,21 +796,21 @@ end
# src==dest (1) same path
touch 'tmp/cptmp'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
install 'tmp/cptmp', 'tmp/cptmp'
}
if have_symlink?
# src==dest (2) symlink and its target
File.symlink 'cptmp', 'tmp/cptmp_symlink'
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
install 'tmp/cptmp', 'tmp/cptmp_symlink'
}
- assert_raises(ArgumentError) {
+ assert_raise(ArgumentError) {
install 'tmp/cptmp_symlink', 'tmp/cptmp'
}
# src==dest (3) looped symlink
File.symlink 'symlink', 'tmp/symlink'
- assert_raises(Errno::ELOOP) {
+ assert_raise(Errno::ELOOP) {
# File#install invokes open(2), always ELOOP must be raised
install 'tmp/symlink', 'tmp/symlink'
}