Commit Graph

82 Commits

Author SHA1 Message Date
Xavier Noria
606203c034 testing/performance.rb needs active_support/core_ext/string/inflections because it uses demodulize 2010-01-01 14:28:56 -08:00
Carl Lerche
d39d7f5f44 Allow ActiveSupport's isolation tests to run with MiniTest on 1.9 2009-12-30 20:48:46 -08:00
José Valim
e58ad8ed9c Setup and teardown now use new callbacks. 2009-12-30 11:09:27 +01:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Yehuda Katz
934bb012ba Fixes remote errors in isolation tests 2009-11-23 15:42:25 -08:00
Jeremy Kemper
c44fb4ced5 Ruby 1.9: use method_name to work around miniunit API changes 2009-11-08 21:30:34 -08:00
Yehuda Katz + Carl Lerche
4f6d6f7031 Have all the tests running off a single Gemfile 2009-10-20 16:34:44 -07:00
Carl Lerche
2110a524a4 Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the application's object root) 2009-10-16 12:51:02 -07:00
Jeremy Kemper
00eb09e016 Revert "Get AS TestCase off deprecated callbacks"
This reverts commit 29b280666b.
2009-10-14 16:12:57 -07:00
Jeremy Kemper
efdc062454 Revert "Rewrite AS::TestCase setup/teardown as a single callback chain"
This reverts commit 610e94c097.
2009-10-14 16:12:57 -07:00
Jeremy Kemper
3fa7e2fc98 Revert "Missing requires"
These rely on constant autoloads.

This reverts commit d39f397dc6.
2009-10-14 14:48:43 -07:00
Michael Koziarski
d39f397dc6 Missing requires 2009-10-15 10:42:18 +13:00
Carl Lerche
ff8be66f24 Finish porting over the initializers to the app object and fix all the tests 2009-10-14 11:47:37 -07:00
Joshua Peek
610e94c097 Rewrite AS::TestCase setup/teardown as a single callback chain 2009-10-12 23:23:02 -05:00
Joshua Peek
29b280666b Get AS TestCase off deprecated callbacks 2009-10-12 23:03:02 -05:00
Joshua Peek
21e7b84621 Callbacks, DeprecatedCallbacks = NewCallbacks, Callbacks 2009-10-12 22:15:43 -05:00
Jeremy Kemper
c23d28e2b3 To unmarshal MissingSourceFile from child 2009-10-09 18:31:30 -07:00
Carl Lerche
6b086449be Fix the broken railties isolation tests 2009-09-29 16:07:29 -07:00
Joshua Peek
f3f2e0b00d Move AS vendor support into bundler.
Run `rake bundle` before running tests.
2009-09-13 12:24:50 -05:00
Yehuda Katz + Carl Lerche
61604feec0 Get Initializer tests running without requiring parts of Rails being loaded first 2009-07-06 12:25:34 -07:00
Yehuda Katz + Carl Lerche
1d280e21a1 Adds support for def self.setup in isolation tests for setup that should be run only once in the parent 2009-07-02 16:03:41 -07:00
Yehuda Katz + Carl Lerche
eea7b5db1d Crazy hacks to get the Isolation testing module to work on non forking environments 2009-06-30 17:39:32 -07:00
Yehuda Katz + Carl Lerche
575b95ea0b Created AS::Testing::Isolation which runs each test case in a separate process.
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.
2009-06-30 12:00:50 -07:00
Carl Lerche
4954379283 Remove stray checks for Rspec in the testing setup. 2009-06-30 08:41:17 -07:00
Yehuda Katz + Carl Lerche
c4a6109286 Got controller/mime_responds_test.rb running on the new base 2009-05-20 16:54:21 -07:00
Jeremy Kemper
f28bd9557c Fix dependencies revealed by testing in isolation 2009-04-22 18:54:13 -07:00
Jeremy Kemper
f5d720fb96 Opt in to Dependencies 2009-04-22 16:42:14 -07:00
Carl Lerche & Yehuda Katz
647b83d50c Resurrecting 1.9 compatibility. 2009-04-13 16:56:04 -07:00
Carl Lerche & Yehuda Katz
906aebceed Bring abstract_controller up to date with rails/master
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:

2259ecf368
AR not available
  * This will be reimplemented with ActionORM or equivalent

06182ea02e
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
  * This will be handled generically

893e9eb995
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:

      199e750d46
      3942cb406e
      f8ea9f85d4
      e3b166aab3
      ae9f258e03
      44423126c6

0cb020b4d6
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.

8c5cc66a83
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.

87e8b16246
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.
2009-04-13 15:18:45 -07:00
Carl Lerche & Yehuda Katz
2036d3ba75 Revert rspec-runner change. TODO: Add back support for the rspec T::U runner. 2009-04-09 12:33:39 -07:00
Yehuda Katz and Carl Lerche
95c9718118 Layouts work in AbstractController. Add support for the rspec runner for T::U 2009-04-07 15:54:02 -07:00
Yehuda Katz and Carl Lerche
4d3cd9b43f Changes necessary to run the T::U tests with the rspec runner 2009-04-06 12:35:24 -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
Yehuda Katz
ff68430077 Whoops. 2009-02-02 12:03:35 -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