aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "prevent minitest from printing a --seed run option"Xavier Noria2013-02-241-12/+2
| | | | | | | | | Reason: on a second thought, minitest prints a seed as run option regardless of the test order, and it actually calls srand, so albeit it might be misleading I believe, it is the way it is and should be left that way. This reverts commit c15862ae0cb876d745609170f0f90a9bb9b5e0ae.
* prevent minitest from printing a --seed run optionXavier Noria2013-02-241-2/+12
| | | | See the first FIXME comment in the patch for the rationale.
* Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-311-1/+10
|
* Inherit from MiniTest::Unit::TestCase instead of MiniTest::SpecRafael Mendonça França2012-12-311-8/+2
|
* Revert "minitest provides "it" and "describe""Rafael Mendonça França2012-12-311-19/+2
| | | | | | | | | | This reverts commit 22bc12ec374b8bdeb3818ca0a3eb787dd3ce39d8. REASON: We will remove the MiniTest::Spec from Rails and we need these methods again Conflicts: activesupport/lib/active_support/test_case.rb
* Replace comments' non-breaking spaces with spacesclaudiob2012-12-041-1/+1
| | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* Revert "Merge pull request #4575 from carlosantoniodasilva/remove-test-pending"Carlos Antonio da Silva2012-11-181-0/+2
| | | | | | | | | This reverts commit 1620df78dff527b4fa3f7b204fa05d1b630aae17, reversing changes made to 2d000328dfc0d4b297fb4bdcebc9af6c2fb559dc. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/test_case.rb
* Simplify code by taking advantage of latest mocha (v0.13.0).James Mead2012-11-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This only works with mocha v0.13.0 or later. Note that this also fixes a few subtle bugs present in the current implementation :- * Mocha was raising a `MiniTest::Assertion` instead of a `Mocha::ExpectationError` as intended. The latter is not recognized by MiniTest as an assertion failure and so it is recorded as a test *error*, not a test *failure* as it ought to. This leads to potentially confusing output in the test results. * Mocha verification should happen as part of the test. The verification of expectations is equivalent to a set of assertions. These assertions should happen as *part of* the test so that they have a chance to cause the test to fail, and not just as part of the teardown. Also if an assertion fails during the test, then there is no need to verify expectations, because only the first assertion failure is normally reported and all subsequent bets are off. * Expectation verification should be counted as an assertion. Mocha cannot record each expectation verification as an assertion, because we weren't passing in an assertion counter to `#mocha_verify`.
* Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-1/+1
|
* Provide a call stack for deprecation warnings where needed.Nikita Afanasenko2012-10-291-1/+2
| | | | It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
* Remove ActiveRecord::Model consant from AS::TestCaseCarlos Antonio da Silva2012-10-261-1/+1
| | | | Fixing the build.
* ConstantLookup is not needed in every TestCase decendantAndy Lindeman2012-09-261-1/+0
|
* Tests tag the Rails log with the current test class and test caseJeremy Kemper2012-09-261-0/+2
|
* Create ActiveSupport::Testing::ConstantLookupMike Moore2012-09-241-0/+2
| | | | | AS::TC::ConstantLookup walks the test's name to find the constant it is describing. This additional lookup logic is needed to better support minitest's spec DSL.
* deprecate `describe` without a block.Aaron Patterson2012-07-091-3/+16
| | | | | minitest/spec provides `describe`, so deprecate the rails version and have people use the superclass version
* we still need `describe` as the implementation differs from minitestAaron Patterson2012-07-081-0/+2
|
* minitest provides "it" and "describe"Aaron Patterson2012-07-081-2/+4
| | | | Remove rails implementation of describe, alias "test" to "it"
* minitest is a gem dep, so remove this conditionalAaron Patterson2012-07-081-6/+0
|
* activesupport gem dependencies should reflect the versions we actually useAaron Patterson2012-07-041-0/+1
|
* hook mocha in through m/t before_setup, after_teardown hooksAaron Patterson2012-07-031-1/+3
|
* add documentation to AS::TestCase#assert_nothing_raisedFrancesco Rodriguez2012-06-191-0/+5
|
* MiniTest::Spec shipped with Ruby >= 1.9.3 always responds_to __name__Akira Matsuda2012-06-061-2/+1
|
* Remove ActiveSupport::TestCase#pending, use `skip` insteadCarlos Antonio da Silva2012-01-211-2/+0
|
* spec class names can possibly be nil in mt/s < 2.6.1, so work around thatAaron Patterson2012-01-061-0/+6
|
* register spec subclasses for people who specAaron Patterson2012-01-061-1/+7
|
* require minitest rather than test/unitAaron Patterson2012-01-061-1/+1
|
* backport assert_not_sameAaron Patterson2012-01-061-0/+1
|
* require test/unit and sort test orderAaron Patterson2012-01-061-0/+6
|
* started converting AS::TestCase to minitestAaron Patterson2012-01-061-2/+12
|
* MiniTest condition removedVishnu Atrai2011-12-311-9/+3
|
* Moved Turn activation/dependency to railtiesDavid Heinemeier Hansson2011-03-311-1/+0
|
* Add using Turn with natural language test case names if the library is ↵David Heinemeier Hansson2011-03-311-17/+2
| | | | available (which it will be in Rails 3.1) [DHH]
* require turn only for minitestDavid Heinemeier Hansson2011-03-311-2/+6
|
* Use Turn to format all Rails tests and enable the natural language case namesDavid Heinemeier Hansson2011-03-311-0/+5
|
* removing AS::Testing::Default in favor of just undefing default_testAaron Patterson2010-10-011-2/+1
|
* fixing activemodel tests. [#4210 state:resolved]Aaron Patterson2010-03-171-0/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM ↵wycats2010-03-171-1/+1
| | | | warnings are in dependencies.
* Add backtrace cleaner on test unit railtie.José Valim2010-02-071-6/+0
|
* Move AS vendor support into bundler.Joshua Peek2009-09-131-1/+0
| | | Run `rake bundle` before running tests.
* Ruby 1.9.2 compat: name method was renamed to __name__ since MiniTest 1.4.x ↵Akira Matsuda2009-07-211-1/+2
| | | | | | [#2922 state:resolved] Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 ↵Yehuda Katz + Carl Lerche2009-07-011-9/+9
| | | | state:resolved]
* Created AS::Testing::Isolation which runs each test case in a separate process.Yehuda Katz + Carl Lerche2009-06-301-0/+1
| | | | | This allows for testing rails bootup (files are required, correct constants are set, etc...). Currently, this is implemented via forking only, but we will add support for jruby and windows shortly.
* Got controller/mime_responds_test.rb running on the new baseYehuda Katz + Carl Lerche2009-05-201-0/+5
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
| * Skip backtrace filters if BACKTRACE environment variable is setJeremy Kemper2009-03-031-1/+1
| |
* | Add support for pendingYehuda Katz2009-02-021-0/+2
|/
* MiniTest::Unit#method_name alias for Test::Unit compatJeremy Kemper2008-11-261-0/+1
|
* Require Mocha >= 0.9.3 which includes a MiniTest adapterJeremy Kemper2008-11-231-11/+7
|
* Move deprecation assertions so TestCase (and Mocha) needn't load on startupJeremy Kemper2008-11-231-0/+2
|
* Get ActiveSupport::TestCase working with classic Test::Unit and MiniTest. ↵Jeremy Kemper2008-11-221-31/+25
| | | | Fix broken Mocha + MiniTest. Assume ruby-core applies patch #771 fixing libraries which extend Test::Unit.