1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test: use assert_include

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-07-26 13:02:33 +00:00
parent 7b3473a13a
commit e7440de279
3 changed files with 4 additions and 4 deletions

View file

@ -147,7 +147,7 @@ class CGIHeaderTest < Test::Unit::TestCase
date = /^Date: ([A-Z][a-z]{2}, \d{2} [A-Z][a-z]{2} \d{4} \d\d:\d\d:\d\d GMT)\r\n/
[actual1, actual2, actual3].each do |actual|
assert_match(date, actual)
assert_includes(time_start..time_end, date =~ actual && Time.parse($1).to_i)
assert_include(time_start..time_end, date =~ actual && Time.parse($1).to_i)
actual.sub!(date, "Date: DATE_IS_REMOVED\r\n")
end
## assertion

View file

@ -497,13 +497,13 @@ module OpenSSL::TestPairM
until th.join(0.01)
accepted = s2.accept_nonblock(exception: false)
assert_includes([s2, :wait_readable, :wait_writable ], accepted)
assert_include([s2, :wait_readable, :wait_writable ], accepted)
end
rets = th.value
assert_instance_of Array, rets
rets.each do |rv|
assert_includes([s1, :wait_readable, :wait_writable ], rv)
assert_include([s1, :wait_readable, :wait_writable ], rv)
end
ensure
th.join if th

View file

@ -390,7 +390,7 @@ End
]
}
}
assert_includes(results, [true, true, true, true, true])
assert_include(results, [true, true, true, true, true])
}
end