aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 09:18:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 09:18:05 +0000
commit3ac0ec4ecdea849143ed64e8935e6675b341e44b (patch)
treefe18c8213610bfdbca51b687133caf5ab297b882 /test/ruby/test_regexp.rb
parent287d2adab0ce45018ada9941ce4eaf67ba6a4d3a (diff)
downloadruby-3ac0ec4ecdea849143ed64e8935e6675b341e44b.tar.gz
test/ruby: better assertions
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index b0efe38d8c..cff2bb6d1f 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -152,7 +152,7 @@ class TestRegexp < Test::Unit::TestCase
def test_assign_named_capture_to_reserved_word
/(?<nil>.)/ =~ "a"
- assert(!local_variables.include?(:nil), "[ruby-dev:32675]")
+ assert_not_include(local_variables, :nil, "[ruby-dev:32675]")
end
def test_match_regexp
@@ -554,11 +554,11 @@ class TestRegexp < Test::Unit::TestCase
$SAFE = 3
/foo/.match("foo")
end.value
- assert(m.tainted?)
+ assert_predicate(m, :tainted?)
assert_nothing_raised('[ruby-core:26137]') {
m = proc {$SAFE = 3; %r"#{ }"o}.call
}
- assert(m.tainted?)
+ assert_predicate(m, :tainted?)
end
def check(re, ss, fs = [], msg = nil)
@@ -1052,6 +1052,6 @@ class TestRegexp < Test::Unit::TestCase
"Expected #{re.inspect} to\n" +
errs.map {|str, match| "\t#{'not ' unless match}match #{str.inspect}"}.join(",\n")
}
- assert(errs.empty?, msg)
+ assert_empty(errs, msg)
end
end