aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test
Commit message (Collapse)AuthorAgeFilesLines
* assertions.rb: remove extra periodnobu2014-02-051-1/+1
| | | | | | | * lib/test/unit/assertions.rb (assert_raise): remove extra period, which will be appended by `message`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: allow procnobu2014-01-231-2/+30
| | | | | | | * lib/test/unit/assertions.rb (assert_raise): allow a proc as message like as other assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix return valuenobu2013-12-241-1/+2
| | | | | | | * lib/test/unit/assertions.rb (assert_throw): should return the caught value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: improve assert_thrownobu2013-12-241-1/+15
| | | | | | | | * lib/test/unit/assertions.rb (assert_throw): revert r44379 and improve failure message, since assert_throws cannot extract the inspection from the execption message correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: assert_thrownobu2013-12-241-6/+1
| | | | | | | * lib/test/unit/assertions.rb (assert_throw): make an alias of assert_throws. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb: [DOC] Fix typoa_matsuda2013-12-181-1/+1
| | | | | | | s/maye be/may be/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: last match in assert_raise_with_messagenobu2013-12-131-2/+9
| | | | | | | | | * lib/test/unit/assertions.rb (assert_raise_with_message): set caller's last match if expected is a Regexp. * test/ruby/test_arity.rb (err_mess): use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb: [DOC] better example for assert_send()zzak2013-11-091-2/+2
| | | | | | | Patch by Andrew Grimm [Bug #8975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix omitted messagenobu2013-10-211-1/+1
| | | | | | | * lib/test/unit/assertions.rb (assert_raise_with_message): remove omitted message by splatting nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: ignore nil messagenobu2013-10-141-0/+2
| | | | | | | * lib/test/unit/assertions.rb (assert): allow nil message and just ignore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit/assertions.rb: return exceptionnobu2013-10-091-0/+1
| | | | | | | | | * lib/test/unit/assertions.rb (assert_raise_with_message): return raised exception same as assert_raise. * test/ruby, test/-ext-: use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: assert_thrownobu2013-09-171-0/+19
| | | | | | | | | * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throw): assertion for throw. MiniTest::Assertions#assert_throws discards the cautht value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: assert_nothing_thrown returns the resultnobu2013-09-171-2/+4
| | | | | | | | * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_nothing_thrown): returns the result of the given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix `<module:MiniTest>': Unit is not a module (TypeError)naruse2013-08-201-1/+1
| | | | | | http://u64b.rubyci.org/~chkbuild/ruby-trunk/log/20130819T183302Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/: [DOC] Document Test::Unit, hide most submodules andzzak2013-08-194-26/+39
| | | | | | | | | | | | | classes from rdoc. Since lib/test is only present as a compatibility layer with the legacy test suite many test/unit users will be using minitest or the test/unit gem instead. It is recommended to use one of these alternatives for writing new tests. This patch was based on a patch submitted by Steve Klabnik. [ruby-core:56694] [Bug #8778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit: assert_raise_with_messagenobu2013-07-051-0/+36
| | | | | | | | * lib/test/unit/assertions.rb (assert_raise_with_message): move from test/fileutils/test_fileutils.rb. this is still experimental and the interface may be changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: remove UNASSIGNEDnobu2013-04-171-9/+5
| | | | | | | * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert): UNASSIGNED is not a valid message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: private flagnobu2013-03-131-1/+7
| | | | | | | * lib/test/unit/assertions.rb (assert_respond_to): accept optional include-private flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: split linesnobu2013-03-081-1/+3
| | | | | | | * lib/test/unit/assertions.rb (Test::Unit::Assertions#message): split msg and default procs by period and newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: allow procnobu2013-03-081-0/+8
| | | | | | | * lib/test/unit/assertions.rb (Test::Unit::Assertions#message): convert msg by call if it is a proc, as well as assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: tty optionnobu2013-01-151-0/+6
| | | | | | | | | | | * bootstraptest/runner.rb (main): add --tty option to output like terminal, for mingw/mswin on cygwin. * lib/test/unit.rb (Test::Unit::Options#setup_options): ditto. * sample/test.rb (Progress#initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unit.rb: no need to check all reportsnobu2012-12-071-1/+1
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need to check all reports. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): no need tousa2012-12-071-3/+3
| | | | | | | | retry skipped test. this fix makes 40% faster the whole test-all with -j5 on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadErrorusa2012-11-301-1/+1
| | | | | | | because it's Gem::LoadError sometimes. see [Bug #6882] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* unit.rb: remove unnecessary includesnobu2012-11-281-4/+0
| | | | | | | * lib/test/unit.rb (Test::Unit::{GlobOption,LoadPathOption}): remove unnecessary includes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bin/testrb: Use only Test::Unit::AutoRunner in test-unit gemkou2012-11-031-0/+7
| | | | | | | | | compatible API to be available by both test/unit bundled in Ruby and test-unit gem. * lib/test/unit.rb (Test::Unit::AutoRunner): Move codes from testrb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (_run_parallel): Delete status line before showingsorah2012-11-021-4/+9
| | | | | | | | | results. Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250] * lib/test/unit.rb (_run_parallel): Fix strange result when disabled retrying. Patch by Hiroshi Shirosaki. [Bug #6897] [ruby-core:47250] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/test-unit.gemspec: Make test/unit default gem.kou2012-08-311-0/+14
| | | | | | | [Feature #6875] [ruby-dev:46051] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/unit/test.rb (Test::Unit::ProxyError): new exception class tousa2012-08-212-1/+10
| | | | | | | | | | | wrap exceptions raised in workers in parallel test mode. * test/unit/parallel.rb (Test::Unit::Worker#puke): use above warpper exception. [Bug #6882] [ruby-dev:46054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb, lib/test/unit/parallel.rb:sorah2012-08-202-6/+5
| | | | | | | generate error message (String) in parallel.rb instead of marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (Test::Unit::Runner#failed): need to delete theusa2012-08-151-1/+4
| | | | | | | status line if the status is skipped and -q is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/testcase.rb(method_added): refactoring.sorah2012-07-211-8/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb: warn when test_* method is redefined.sorah2012-07-211-0/+11
| | | | | | | | | | Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790] * test/testunit/test_redefinition.rb: Test for above. * test/testunit/test4test_redefinition.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: use uniq!nobu2012-07-141-6/+1
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use Array#uniq!. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: extract dealnobu2012-07-141-63/+48
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: extract quit_workersnobu2012-07-141-28/+35
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill all workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: extract delete_workernobu2012-07-141-3/+7
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead worker from working set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: launch_worker to manage new workernobu2012-07-141-10/+9
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker to working set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: extract launch_workernobu2012-07-141-15/+15
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: extract start_watchdognobu2012-07-141-14/+17
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: _run_parallelnobu2012-07-141-11/+11
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move initializations with nothing to release outside begin/ensure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: dots from a workernobu2012-07-121-1/+1
| | | | | | | | * lib/test/unit.rb (Test::Unit::StatusLineOutput#print): sometimes dots from a worker get stuck. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: unnecessary job_statusnobu2012-07-121-1/+0
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): no needs to override job_status option unnecessarily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: separate each outputsnobu2012-07-121-1/+4
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#del_status_line): separate each outputs if not replace mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warningnobu2012-07-071-1/+1
| | | | | | | * lib/test/unit.rb (terminal_width): suppress uninitialized instance variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Undef on_parallel_worker? before redefine.naruse2012-07-031-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: workaround fix for rubygems.naruse2012-06-281-0/+4
| | | | | | | RubyGems can't find rake if the source directory is not equal to the directory which is running the test. [Bug #6604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb: show file count in parallel modenobu2012-06-221-2/+9
| | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): show file count in parallel mode. since worker processes run tests per files, the parent process cannot tell how many tests will be run in advance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb: initialize ivarnobu2012-06-221-0/+1
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#del_status_line): initialize @status_line_size if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb: workers sudden-deathnobu2012-06-201-1/+1
| | | | | | | * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): deal with sudden-death of workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e