Commit Graph

26 Commits

Author SHA1 Message Date
Santiago Pastorino c10958fbdd avoid method redefined; discarding old empty? warning [#4302 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-30 16:59:48 -07:00
Juanjo Bazan 589deb39c7 New assertion: assert_present [#4299 state:committed]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 15:25:38 -07:00
Juanjo Bazan 7212c29802 new assertion: assert_blank
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 15:25:38 -07:00
José Valim e58ad8ed9c Setup and teardown now use new callbacks. 2009-12-30 11:09:27 +01:00
Jeremy Kemper 00eb09e016 Revert "Get AS TestCase off deprecated callbacks"
This reverts commit 29b280666b.
2009-10-14 16:12:57 -07:00
Joshua Peek 29b280666b Get AS TestCase off deprecated callbacks 2009-10-12 23:03:02 -05:00
Jeremy Kemper f28bd9557c Fix dependencies revealed by testing in isolation 2009-04-22 18:54:13 -07:00
Jeremy Kemper 7564d98929 Include failed difference expression in assert message 2009-02-06 09:55:32 -08:00
Jeremy Kemper a75354fae1 Ruby 1.9 compat: don't use defined? on complex expressions 2008-11-22 19:19:12 -08:00
Jeremy Kemper 728606df91 Just rescue exception rather than checking for both miniunit and test/unit 2008-11-07 13:00:13 -05:00
Jeremy Kemper 18099b0fd5 Rework testing extensions to reflect the recent miniunit upheaval 2008-11-07 12:45:48 -05:00
Jeremy Kemper 7b28a55a2b Remove direct TestCase mixins. Add miniunit compatibility. 2008-11-07 01:16:06 -05:00
Michael Koziarski 923eb9569c Fix mismatched assertions. 2008-10-04 21:11:30 +02:00
madlep 00e2ba76b2 added nicer failure reporting to #assert_difference to tell you the expression that failed rather than just the expected and actual values
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1161 state:committed]
2008-10-03 21:31:56 +02:00
Jeremy Kemper 16a9787bf0 Add empty setup and teardown methods to rule out default setup behavior in base class 2008-06-09 23:04:51 -07:00
Jeremy Kemper aae37bb4f7 Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:44:45 +00:00
Jeremy Kemper 139b92495f * Continue evolution toward ActiveSupport::TestCase and friends. #10679 [Josh Peek]
* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse.  [Jeremy Kemper]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:34:15 +00:00
Jeremy Kemper f6d8526659 require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:31:04 +00:00
Michael Koziarski cf9be897b8 Make sure default_test is tested for ActiveSupport::TestCase too
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8041 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 23:38:34 +00:00
Michael Koziarski 56fec2f269 Make Default Test work with both ruby 1.8.4 and 1.8.6. [DrMark] Closes #10003
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 23:24:10 +00:00
Jeremy Kemper 6ea4dd4a65 Mark Test::Unit#assert_difference incompatibility with Ruby 2 due to Proc#binding usage
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-29 22:08:41 +00:00
Tobias Lütke 13058b0188 Enhance assert_difference to accept arrays of strings which are then evaled
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 20:20:19 +00:00
Jeremy Kemper d2acf8b548 Silence some warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-18 21:16:43 +00:00
Marcel Molina 2b6ad48ea3 Evaluate expression for assert_difference in the scope of the block
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-08 06:27:10 +00:00
Marcel Molina 689b529ea8 Simplify API of assert_difference by passing in an expression that is evaluated before and after the passed in block. See documenation for examples of new API. [Marcel Molina Jr.]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6693 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-08 03:54:34 +00:00
Tobias Lütke 8f5c83bdea Added assert_difference and assert_no_difference to test/unit assertions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-01 21:02:37 +00:00