diff options
author | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:08:24 +0100 |
---|---|---|
committer | guy Decoux <ts@moulon.inra.fr> | 2009-02-28 20:08:24 +0100 |
commit | a181d44ee4b78d7e016cf5b9e8fd5591723615bd (patch) | |
tree | b78f0d2b978a9df55acd5dfd222ceebfcbc50c03 /tests/runit_.rb | |
parent | ddd4bfbddf5d2972f5eaf47bc6b89d154203f45f (diff) | |
download | mmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.zip mmap-ruby-a181d44ee4b78d7e016cf5b9e8fd5591723615bd.tar.gz |
mmap-0.1.8
Diffstat (limited to 'tests/runit_.rb')
-rw-r--r-- | tests/runit_.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/runit_.rb b/tests/runit_.rb new file mode 100644 index 0000000..0479592 --- /dev/null +++ b/tests/runit_.rb @@ -0,0 +1,44 @@ +begin + require 'test/unit' +rescue LoadError + require 'runit/testcase' + require 'runit/cui/testrunner' + + module RUNIT + module Assert + def assert_raises(error, message = nil) + begin + yield + rescue error + assert(true, message) + rescue + assert_fail("must fail with #{error} : #{string}") + else + assert_fail("*must* fail : #{string}") + end + end + def flunk(message = "") + assert_fail(message) + end + end + end +end + + +if RUBY_VERSION > "1.7" + class Array + alias indices select + end + class Hash + alias indexes select + end + module BDB + class Common + alias indexes select + end + + class Recnum + alias indices select + end + end +end |