aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test/unit
Commit message (Collapse)AuthorAgeFilesLines
* * lib/test: Removed because ruby's test cases now independent tosorah2014-05-174-702/+0
| | | | | | | | | lib/test by r45970. [Feature #9711] [ruby-core:62620] I'm still considering about the future of lib/minitest, lib/test. (bundling gems?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parallel.rb: fix test-all parallel failureshirosaki2014-05-151-0/+5
| | | | | | | | | | | | | | | | | * lib/test/unit/parallel.rb: fix test-all parallel failure if a test is skipped after raise. DL::TestFunc#test_sinf is skipped after raise on mingw ruby. But it causes Mashal.load failure due to undefined class/module DL::DLError when doing test-all parallel and test-all doesn't complete. We create new MiniTest::Skip object to avoid Mashal.load failure. [ruby-core:62133] [Bug #9767] * test/testunit/test_parallel.rb (TestParallel): add a test. * test/testunit/tests_for_parallel/ptest_forth.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: assert_all? assert_not_all?nobu2014-03-011-0/+20
| | | | | | | * lib/test/unit/assertions.rb (assert_all?, assert_not_all?): new assertions for all iterations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/test-unit.gemspec: Add minitest < 5.0.0 dependencysorah2014-02-181-0/+4
| | | | | | | | * tool/rbinstall.rb: Add empty implementations for `add_dependency`, `add_runtime_dependency`, `add_development_dependency` for Gem::Specification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* * lib/test/: [DOC] Document Test::Unit, hide most submodules andzzak2013-08-193-11/+13
| | | | | | | | | | | | | 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
* * 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
* * 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-211-1/+1
| | | | | | | | | | | 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-201-1/+4
| | | | | | | 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/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
* 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/parallel.rb: new method to report to the parentnobu2012-06-191-10/+15
| | | | | | | * lib/test/unit/parallel.rb (Test::Unit::Worker#_report): extract method to report to the parent process git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit: refactoring pukenobu2012-06-151-2/+8
| | | | | | | | | | | | * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and drop useless reports, not override entirely. * lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report unformatted results. formatting messages is not a workers task. * lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (terminal_width, del_status_line, put_status):nobu2012-03-291-1/+1
| | | | | | | extract as methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb: Put error message into STDERR if failed to lanchsorah2012-03-111-5/+11
| | | | | | | | | worker (job) process. [ruby-dev:44802] [Bug #5577] * lib/test/unit/parallel.rb: If failed to increment_io, exit with code 2. [ruby-dev:44802] [Bug #5577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb (build_message): skip escapednobu2012-02-141-1/+1
| | | | | | | question marks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: use pack("m0") instead ofkazu2012-01-021-4/+4
| | | | | | | pack("m").gsub("\n",""). * lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (_run_parallel):sorah2011-12-251-1/+1
| | | | | | | | | | | New option "--separate" for test/unit; when running tests with this option, a job process will be restarted after one testcase has done. This means all testcases will run with separated process. * lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts "ready!" for first ready, "ready" for afters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid ofusa2011-11-181-2/+4
| | | | | | | warnings when using assert/assert_respond_to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb (assert_send, assert_not_send):nobu2011-10-071-2/+2
| | | | | | parenthesize non-empty arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_send): fix message.nobu2011-09-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb (assert_send): make arguments innobu2011-09-121-0/+52
| | | | | | the default message clearer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb: Import documentation patch by Justinsorah2011-07-101-3/+106
| | | | | | Collins. [ruby-core:37225] [Feature #4903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker?sorah2011-06-191-7/+13
| | | | | | | | | only when $0 == __FILE__. * lib/test/unit/parallel.rb: Run Test::Unit::Worker.run only when $0 == __FILE__. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/testunit/test_parallel.rb: Fix Regexp for test.sorah2011-06-162-0/+10
| | | | | | | | | | | | | * test/testunit/tests_for_parallel/test_third.rb: Use Test::Unit::TestCase#on_parallel_worker? for detecting worker. * lib/test/unit/testcase.rb(Test::Unit::TestCase#on_parallel_worker?): New Method Test::Unit::TestCase#on_parallel_worker? returns true when a testcase is running on parallel worker. * lib/test/unit/parallel.rb(Test::Unit::TestCase#on_parallel_worker?): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't break test-all.naruse2011-06-101-5/+0
| | | | | | | | Revert "* lib/test/unit/assertions.rb (Test::Unit::Assertions#skip): reason to" This reverts commit r31982. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/assertions.rb (Test::Unit::Assertions#skip): reason tonobu2011-06-101-0/+5
| | | | | | skip should be explained. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: Keep $stdin, $stdout before run testcasesorah2011-06-031-2/+8
| | | | | | | and restore after run. Because some test break $stdin, $stdout. Fixes [Bug #4433] [ruby-core:35353] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: Never Ignore SIGINT. When receivedsorah2011-05-231-3/+15
| | | | | | | | | Interrupt, immediately puts result and exit. [ruby-dev:43571] * lib/test/unit.rb: When received Interrupt, wait results from workers and correct them. [ruby-dev:43571] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit/parallel.rb: remove unused variable.naruse2011-03-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e