summaryrefslogtreecommitdiff
path: root/bootstraptest/test_exception.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-14 12:48:12 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-14 12:48:12 +0000
commitb235e8f474b24b22162ed3feb8a0a3abec14f2e0 (patch)
tree17580a92aac656dc9eea4214ad6cf67056b85a49 /bootstraptest/test_exception.rb
parent7e8d337aa47a282f632b11d62503739251766463 (diff)
* bootstraptest/runner.rb (assert_check): new method.
(assert_match): new method. (assert_equal): use assert_check. (pretty): give failure description as an argument. * bootstraptest/test_exception.rb: use assert_match to describe the test for [ruby-dev:31407]. [ruby-dev:31412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_exception.rb')
-rw-r--r--bootstraptest/test_exception.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/bootstraptest/test_exception.rb b/bootstraptest/test_exception.rb
index 85ed946..1f103cf 100644
--- a/bootstraptest/test_exception.rb
+++ b/bootstraptest/test_exception.rb
@@ -370,12 +370,11 @@ assert_equal %q{}, %q{
}
##
-assert_equal "ok", %q{
- $foo = "ok"
+assert_match /undefined method `foo'/, %q{
+ STDERR.reopen(STDOUT)
class C
def inspect
bar {}
- $foo = "ng"
end
def bar
@@ -383,11 +382,6 @@ assert_equal "ok", %q{
ensure
end
end
-
- begin
- C.new.foo
- rescue NoMethodError => e
- $foo
- end
+ C.new.foo
}, "[ruby-dev:31407]"