Commit Graph

59 Commits

Author SHA1 Message Date
Jamis Buck
c545331f9e Revert "scrub instance variables from test cases on teardown"
This reverts commit b5cf2b4b82.
2011-01-19 15:57:16 -07:00
Jamis Buck
cd0ecff00b Revert "rein in GC during tests by making them run (at most) once per second"
This reverts commit a0c761dc6b.
2011-01-19 15:57:14 -07:00
Jamis Buck
a0c761dc6b rein in GC during tests by making them run (at most) once per second
this can provide a significant performance boost during testing, by
preventing the GC from running too frequently.
2011-01-19 10:27:53 -07:00
Jamis Buck
b5cf2b4b82 scrub instance variables from test cases on teardown
this prevents test state from accumulating, resulting in leaked
objects and slow tests due to overactive GC.
2011-01-19 10:12:18 -07:00
Aaron Patterson
8beb84fa33 calling correct method on minitest for test name when teardown callback fails 2010-10-04 09:29:37 -07:00
Aaron Patterson
a448e74661 [#5406 state:resolved] calling the correct method on minitest to obtain the test name 2010-10-04 09:28:21 -07:00
Aaron Patterson
7b6383f263 fixing performance regression from 2.3.5 -> 2.3.8 2010-07-15 15:59:19 -07:00
Juanjo Bazan
4b08679ba9 New assertion: assert_present
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 16:02:40 -07:00
Juanjo Bazan
ccb1beeb5b new assertion: assert_blank
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-03-30 15:59:09 -07:00
Yehuda Katz + Carl Lerche
a8bd3c8a10 Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 state:resolved] 2009-07-01 12:09:32 -07:00
Ken Collins
4b4e7caffa The latest trunk of Mocha > 0.9.5 which addresses issue with MiniUnit compatibility uses namespaced integration classes.
[#2060 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-03-10 14:07:40 -07:00
Jeremy Kemper
24ac1d6bdc Oops, don't yield per expression 2009-02-06 17:01:34 -08:00
Jeremy Kemper
7564d98929 Include failed difference expression in assert message 2009-02-06 09:55:32 -08:00
Jeremy Kemper
8746f7cac2 Remove dead testing core_ext 2009-02-06 09:54:13 -08:00
Jeremy Kemper
86dcfdc1fb Work around enumerable string deprecation warnings 2009-02-06 09:18:41 -08:00
Matthias Hennemeyer
86dd2f841d Tightening the condition for including ActiveSupport::Testing::SetupAndTeardown::ForMiniTest.
[#1871 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-06 08:59:02 -08:00
Pratik Naik
e0fa041fce Process time should be wall time when benchmarking 2009-01-09 16:46:24 +00:00
Jeremy Kemper
e931012287 Require Mocha >= 0.9.3 which includes a MiniTest adapter 2008-11-23 15:05:59 -08:00
Jeremy Kemper
9d4ae40bb4 Move deprecation assertions so TestCase (and Mocha) needn't load on startup 2008-11-23 13:11:07 -08:00
Jeremy Kemper
e7208d382a Get ActiveSupport::TestCase working with classic Test::Unit and MiniTest. Fix broken Mocha + MiniTest. Assume ruby-core applies patch #771 fixing libraries which extend Test::Unit. 2008-11-22 19:22:45 -08:00
Jeremy Kemper
d8a555e137 Mocha 0.9.0 compatibility for test setup/teardown callbacks 2008-11-20 13:47:35 -08:00
Jeremy Kemper
9e9dde617f Require callbacks so AS::TestCase may be required in isolation 2008-11-15 19:07:57 -08:00
Jeremy Kemper
ae9581e0f3 Extract test method declaration 2008-11-07 13:25:40 -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
Pratik Naik
aba1d77f38 Check first for git repository before using git branch 2008-11-02 19:36:56 +05:30
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
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Jeremy Kemper
4bcd64c9e9 Ruby 1.9 compat: switch profile_options to superclass_delegating_accessor 2008-08-25 22:01:02 -07:00
Jeremy Kemper
7fbe226de5 Ruby 1.9 and GC::Profiler updates 2008-08-18 16:41:08 -07:00
Jeremy Kemper
2cf161a384 Once is enough, mmk 2008-07-28 13:54:10 -07:00
Joshua Peek
d84d99a8f7 Undefine old run method 2008-07-19 10:52:30 -05:00
Jeremy Kemper
7430c4168f Decrease default benchmark runs from 10 to 4 2008-07-17 23:18:21 -07:00
Michael Koziarski
51e13d51ad Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly. 2008-07-04 10:41:39 +03:00
Jeremy Kemper
d7462ea365 Revert "Check for mocha gem without requiring the lib. [#403 state:resolved]"
This reverts commit 4d5ac3f3d2.
2008-06-23 00:31:49 -07:00
Jeremy Kemper
4d5ac3f3d2 Check for mocha gem without requiring the lib. [#403 state:resolved] 2008-06-22 20:52:29 -07:00
Jeremy Kemper
8d24a029df Don't assume RubyProf constants are defined 2008-06-20 10:42:36 -07:00
Jeremy Kemper
879245de1c Tired of seeing <foo>/run 2008-06-20 00:36:59 -07:00
Jeremy Kemper
83c3e9903d Don't profile GC runs/time by default 2008-06-20 00:35:11 -07:00
Jeremy Kemper
1e0d2e36cc Performance: add GC metrics for # of runs and total runtime 2008-06-18 19:19:22 -07:00
Jeremy Kemper
2541f7ac47 Oops, include metric name in csv filename 2008-06-18 18:36:04 -07:00
Jeremy Kemper
616bc42fd7 Performance: tweak unsupported metric error message 2008-06-18 18:34:25 -07:00
Jeremy Kemper
90a9a7013c Write benchmark output to separate files per test+metric. Support Lloyd Hilaiel's GC.heap_info patch for current heap size. 2008-06-18 16:02:27 -07:00
Jeremy Kemper
899d63b997 process time for benchmarks (quicker), wall time for profiling (lower overhead) 2008-06-16 03:45:20 -07:00
Jeremy Kemper
fa2a255352 missed . joining rails version and git revision 2008-06-16 00:16:43 -07:00
Jeremy Kemper
ed67d90a98 Metrics::Memory measures in fractional KB also 2008-06-16 00:10:30 -07:00
Jeremy Kemper
49d19515b7 Extract environment. Hardcode some git info so I can start working with it now. 2008-06-16 00:08:39 -07:00
Jeremy Kemper
e8f78998b2 Force runs to be an integer. Start and stop RubyProf in same scope. Expect memory measurements in fractional KB now instead of bytes. Convert object allocation measurements to integer. Wrap up measure_mode in Metric instance method. 2008-06-15 21:47:28 -07:00
Jeremy Kemper
f93a6d99e6 Delegate run_test to @harness 2008-06-15 16:26:51 -07:00
Jeremy Kemper
59b2daba4f Metrics::[] escues NameError only. Fix MODE typo. 2008-06-15 14:48:15 -07:00