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

envutil.rb: count assertions

* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
  count assertions in separated tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-12-14 05:58:41 +00:00
parent 8adec52962
commit 2bd5113c8c
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Dec 14 14:58:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately):
count assertions in separated tests.
Fri Dec 14 14:16:42 2012 Eric Hodel <drbrain@segment7.net> Fri Dec 14 14:16:42 2012 Eric Hodel <drbrain@segment7.net>
* lib/rdoc/rubygems_hook.rb: Fixed generation of documentation. * lib/rdoc/rubygems_hook.rb: Fixed generation of documentation.

View file

@ -198,10 +198,11 @@ module Test
src = <<eom src = <<eom
require 'test/unit';include Test::Unit::Assertions;begin;#{src} require 'test/unit';include Test::Unit::Assertions;begin;#{src}
ensure ensure
print [Marshal.dump($!)].pack('m') puts [Marshal.dump($!)].pack('m'), "assertions=\#{self._assertions}"
end end
eom eom
stdout, _stderr, _status = EnvUtil.invoke_ruby(args, src, true, true, opt) stdout, _stderr, _status = EnvUtil.invoke_ruby(args, src, true, true, opt)
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
res = Marshal.load(stdout.unpack("m")[0]) res = Marshal.load(stdout.unpack("m")[0])
return unless res return unless res
res.backtrace.each do |l| res.backtrace.each do |l|