aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/test_case_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make `assert_difference` return the result of the yielded block.Lucas Mazza2015-09-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | With this we can perform new assertions on the returned value without having to cache it with an outer variable or wrapping all subsequent assertions inside the `assert_difference` block. Before: ``` post = nil assert_difference -> { Post.count }, 1 do Post.create end assert_predicate post, :persisted? ``` Now: ``` post = assert_difference -> { Post.count } do Post.create end assert_predicate post, :persisted? ```
* Remove alias for `i_suck_and_my_tests_are_order_dependent`.Guo Xiang Tan2015-03-241-11/+0
|
* Change the default test order from `:sorted` to `:random`Rafael Mendonça França2015-01-041-13/+11
|
* Default to sorting user's test cases for nowGodfrey Chan2014-09-081-0/+47
| | | | | | | | | | | Goals: 1. Default to :random for newly generated applications 2. Default to :sorted for existing applications with a warning 3. Only show the warning once 4. Only show the warning if the app actually uses AS::TestCase Fixes #16769
* Move as/test_test to as/test_case_testZachary Scott2014-08-191-0/+174
|
* Remove active_support/testing/pending.rb was deprecated.kennyj2013-06-011-11/+0
|
* Updates to make rails 4 happy with minitest 5:Ryan Davis2013-05-061-110/+0
| | | | | | | | | | + Namespace changes, overhaul of runners. + Internal ivar name changes - Removed a logger globally applied to tests that spew everywhere?!? + Override Minitest#__run to sort tests by name. + Reworked testing isolation to work with the new cleaner architecture. - Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago. - Minor report output differences.
* Fix failures in AS with minitest 4.7.4Carlos Antonio da Silva2013-05-011-0/+3
|
* Properly deprecate #pending from AS::TestCaseCarlos Antonio da Silva2012-11-181-0/+6
| | | | Check https://github.com/rails/rails/pull/4575#issuecomment-5765575.
* Make the tests pass with minitest 4.2Rafael Mendonça França2012-11-051-0/+3
|
* Exceptions like Interrupt should not be rescued.James Mead2012-05-281-8/+50
| | | | | | | | | | | | | | | | | | | | | | | Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which overrides MiniTest::Unit::TestCase#run rescues them. Rescuing an Interrupt exception is annoying, because it means when you are running a lot of tests e.g. when running one of the rake test tasks, you cannot break out using ctrl-C. Rescuing exceptions like NoMemoryError is foolish, because the most sensible thing to happen is for the process to terminate as soon as possible. This solution probably needs some finessing e.g. I'm not clear whether the assumption is that only MiniTest is supported. Also early versions of MiniTest did not have this behaviour. However, hopefully it's a start. Integrating with Test::Unit & MiniTest has always been a pain. It would be great if both of them provided sensible extension points for the kind of things that both Rails and Mocha want to do.
* make sure the test case name is nilAaron Patterson2012-01-061-0/+8
|
* No need to check if MiniTest::Assertions is definedRafael Mendonça França2012-01-061-32/+30
|
* fixing test case test on 1.9.3devAaron Patterson2011-03-011-0/+4
|
* calling correct method on minitest for test name when teardown callback failsAaron Patterson2010-10-041-0/+19
|
* [#5406 state:resolved] calling the correct method on minitest to obtain the ↵Aaron Patterson2010-10-041-0/+38
test name