summaryrefslogtreecommitdiff
path: root/lib/test/unit
AgeCommit message (Collapse)Author
2014-05-17* lib/test: Removed because ruby's test cases now independent tosorah
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
2014-05-15parallel.rb: fix test-all parallel failureshirosaki
* 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
2014-03-01assertions.rb: assert_all? assert_not_all?nobu
* 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
2014-02-18* lib/test/unit/test-unit.gemspec: Add minitest < 5.0.0 dependencysorah
* 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
2014-02-05assertions.rb: remove extra periodnobu
* 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
2014-01-23assertions.rb: allow procnobu
* 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
2013-12-24assertions.rb: fix return valuenobu
* 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
2013-12-24assertions.rb: improve assert_thrownobu
* 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
2013-12-24assertions.rb: assert_thrownobu
* 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
2013-12-18* lib/test/unit/assertions.rb: [DOC] Fix typoa_matsuda
s/maye be/may be/ [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13assertions.rb: last match in assert_raise_with_messagenobu
* 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
2013-11-09* lib/test/unit/assertions.rb: [DOC] better example for assert_send()zzak
Patch by Andrew Grimm [Bug #8975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-21assertions.rb: fix omitted messagenobu
* 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
2013-10-14assertions.rb: ignore nil messagenobu
* 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
2013-10-09test/unit/assertions.rb: return exceptionnobu
* 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
2013-09-17assertions.rb: assert_thrownobu
* 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
2013-09-17assertions.rb: assert_nothing_thrown returns the resultnobu
* 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
2013-08-19* lib/test/: [DOC] Document Test::Unit, hide most submodules andzzak
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
2013-07-05test/unit: assert_raise_with_messagenobu
* 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
2013-04-17assertions.rb: remove UNASSIGNEDnobu
* 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
2013-03-13assertions.rb: private flagnobu
* 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
2013-03-08assertions.rb: split linesnobu
* 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
2013-03-08assertions.rb: allow procnobu
* 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
2012-11-30* lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadErrorusa
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
2012-08-31* lib/test/unit/test-unit.gemspec: Make test/unit default gem.kou
[Feature #6875] [ruby-dev:46051] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21* test/unit/test.rb (Test::Unit::ProxyError): new exception class tousa
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
2012-08-20* lib/test/unit.rb, lib/test/unit/parallel.rb:sorah
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
2012-07-21* lib/test/unit/testcase.rb(method_added): refactoring.sorah
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21* lib/test/unit.rb: warn when test_* method is redefined.sorah
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
2012-07-03Undef on_parallel_worker? before redefine.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-28* lib/test/unit/parallel.rb: workaround fix for rubygems.naruse
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
2012-06-19lib/test/unit/parallel.rb: new method to report to the parentnobu
* 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
2012-06-15lib/test/unit: refactoring pukenobu
* 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
2012-03-29* lib/test/unit.rb (terminal_width, del_status_line, put_status):nobu
extract as methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-11* lib/test/unit.rb: Put error message into STDERR if failed to lanchsorah
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
2012-02-14* lib/test/unit/assertions.rb (build_message): skip escapednobu
question marks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-02* lib/test/unit/parallel.rb: use pack("m0") instead ofkazu
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
2011-12-25* lib/test/unit.rb (_run_parallel):sorah
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
2011-11-18* test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid ofusa
warnings when using assert/assert_respond_to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-07* lib/test/unit/assertions.rb (assert_send, assert_not_send):nobu
parenthesize non-empty arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-12* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_send): fix message.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-12* lib/test/unit/assertions.rb (assert_send): make arguments innobu
the default message clearer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10* lib/test/unit/assertions.rb: Import documentation patch by Justinsorah
Collins. [ruby-core:37225] [Feature #4903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-19* lib/test/unit/parallel.rb: Override Test::Unit::TestCase#on_parallel_worker?sorah
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
2011-06-16* test/testunit/test_parallel.rb: Fix Regexp for test.sorah
* 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
2011-06-10Don't break test-all.naruse
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
2011-06-10* lib/test/unit/assertions.rb (Test::Unit::Assertions#skip): reason tonobu
skip should be explained. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03* lib/test/unit/parallel.rb: Keep $stdin, $stdout before run testcasesorah
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
2011-05-23* lib/test/unit/parallel.rb: Never Ignore SIGINT. When receivedsorah
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
2011-03-21* lib/test/unit/parallel.rb: remove unused variable.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e