summaryrefslogtreecommitdiffstats
path: root/test/testunit
diff options
context:
space:
mode:
authorntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-01 19:25:51 +0000
committerntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-01 19:25:51 +0000
commit8bbb49ddfe12cc85232f9811c495592d8b26a206 (patch)
tree7f7da22f9a6b40b483e2a9ecc3355674a0fbc017 /test/testunit
parentcb2bb9a5942b430017c154fd543417d580e3fd85 (diff)
downloadruby-8bbb49ddfe12cc85232f9811c495592d8b26a206.tar.gz
ruby-8bbb49ddfe12cc85232f9811c495592d8b26a206.tar.xz
ruby-8bbb49ddfe12cc85232f9811c495592d8b26a206.zip
* lib/test/unit/assertions.rb: fixed #assert_no_match message.
* test/testunit/test_assertions.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit')
-rw-r--r--test/testunit/test_assertions.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/test/testunit/test_assertions.rb b/test/testunit/test_assertions.rb
index 0d79044dc..f62a6186e 100644
--- a/test/testunit/test_assertions.rb
+++ b/test/testunit/test_assertions.rb
@@ -336,18 +336,17 @@ module Test
end
def test_assert_no_match
- check_nothing_fails {
- assert_no_match(/sling/, "string")
- }
- check_nothing_fails {
- assert_no_match(/sling/, "string", "message")
- }
- check_fails(%Q{</string/> expected to not match\n<"string">.}) {
+ check_nothing_fails{assert_no_match(/sling/, "string")}
+ check_nothing_fails{assert_no_match(/sling/, "string", "message")}
+ check_fails(%Q{The first argument to assert_no_match should be a Regexp.\n<"asdf"> expected to be an instance of\n<Regexp> but was\n<String>.}) do
+ assert_no_match("asdf", "asdf")
+ end
+ check_fails(%Q{</string/> expected to not match\n<"string">.}) do
assert_no_match(/string/, "string")
- }
- check_fails(%Q{message.\n</string/> expected to not match\n<"string">.}) {
+ end
+ check_fails(%Q{message.\n</string/> expected to not match\n<"string">.}) do
assert_no_match(/string/, "string", "message")
- }
+ end
end
def test_assert_throws