summaryrefslogtreecommitdiffstats
path: root/tests/mmapt.rb
diff options
context:
space:
mode:
authorguy Decoux <ts@moulon.inra.fr>2009-02-28 20:08:24 +0100
committerguy Decoux <ts@moulon.inra.fr>2009-02-28 20:08:24 +0100
commita181d44ee4b78d7e016cf5b9e8fd5591723615bd (patch)
treeb78f0d2b978a9df55acd5dfd222ceebfcbc50c03 /tests/mmapt.rb
parentddd4bfbddf5d2972f5eaf47bc6b89d154203f45f (diff)
downloadmmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.zip
mmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.tar.gz
mmap-0.1.8
Diffstat (limited to 'tests/mmapt.rb')
-rw-r--r--tests/mmapt.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/mmapt.rb b/tests/mmapt.rb
index a7a049c..c6a1fdc 100644
--- a/tests/mmapt.rb
+++ b/tests/mmapt.rb
@@ -2,17 +2,12 @@
$LOAD_PATH.unshift *%w{.. . tests}
require 'mmap'
require 'ftools'
-begin
- require 'test/unit'
- Inh = Test::Unit
-rescue LoadError
- require 'runit/testcase'
- require 'runit/cui/testrunner'
- Inh = RUNIT
-end
+require 'runit_'
$mmap, $str = nil, nil
+Inh = defined?(RUNIT) ? RUNIT : Test::Unit
+
class TestMmap < Inh::TestCase
def internal_init
$mmap.unmap if $mmap
@@ -70,7 +65,7 @@ class TestMmap < Inh::TestCase
eval "$mmap#{access}"
rescue IndexError, RangeError
else
- assert_fail("*must* fail with IndexError")
+ flunk("*must* fail with IndexError")
end
else
eval "$mmap#{access}"
@@ -114,7 +109,7 @@ class TestMmap < Inh::TestCase
eval "$mmap#{access}"
rescue IndexError, RangeError
else
- assert_fail("*must* fail with IndexError")
+ flunk("*must* fail with IndexError")
end
else
eval "$mmap#{access}"