Commit Graph

50 Commits

Author SHA1 Message Date
Yehuda Katz
3f0ed205e7 Remind us that RoutingAssertions should work in an integration context 2010-02-26 22:47:36 -08:00
Carlhuda
050831803a If IntegrationSession is initialized with an objects that responds to #routes, automatically extend the URL helpers from the RouteSet onto it 2010-02-26 17:18:45 -08:00
Carlhuda
ab0cc7286f Setting UrlFor in with_routing is no longer needed now that it's not global 2010-02-26 15:56:38 -08:00
Carlhuda
3bad24c85d Remove traces of SharedTestRoutes from user code; leave it as a standin for Rails.application.routes in Rails internal tests 2010-02-26 15:44:22 -08:00
Carlhuda
bae691f61a Change the API for setting global options for #url_for to self.url_options = { ... }
This attr_accessor can be set in a before filter or in the action itself.
    Overwriting default_url_options still works but will output a deprecation notice.
2010-02-26 15:20:41 -08:00
Carlhuda
98f77e0827 Rename named_url_helpers to url_helpers and url_helpers to url_for 2010-02-26 15:04:50 -08:00
Carlhuda
f863045c45 Rename metaclass to singleton_class 2010-02-25 17:56:58 -08:00
Carlhuda
8760add31a Get URL helpers working again in integration tests. 2010-02-25 17:53:30 -08:00
Carlhuda
fc4582fb66 Final pass at removing the router from a global constant 2010-02-25 17:53:29 -08:00
Carlhuda
226dfc2681 WIP: Remove the global router 2010-02-25 17:53:00 -08:00
Jeremy Kemper
f7b0a857e9 Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice. 2010-02-25 09:32:29 -08:00
Martin Schürrer
6bc24d40d5 Use ActionDispatch::Routing everywhere 2010-02-21 13:43:51 -08:00
Carlhuda
a3c6ad7d5e Fix a bunch of pending tests by providing an introspection mode for the Response object that does up-front parsing of the headers to populate things like @etag 2010-02-19 19:19:20 -08:00
José Valim
47a236e291 AD::TestProcess relies on request.flash, so let's load it. 2010-02-16 22:54:56 +01:00
Joshua Peek
1bd8a50a99 Deprecation notice for TestResponse#redirected_to 2010-01-30 12:26:49 -06:00
Joshua Peek
909443eab6 Expose last controller in rack env["action_controller.instance"] 2010-01-20 09:00:23 -06:00
Joshua Peek
88ffba2329 Disable ShowExceptions during integration tests 2010-01-19 09:06:21 -06:00
Pratik Naik
dba196cb7f Merge docrails 2010-01-17 03:26:20 +05:30
José Valim
0cf190001e Remove CGI.escape in function of Rack::Mount.escape 2010-01-06 00:33:17 +01:00
Joshua Peek
8ff4faf66a assert_template depends on AV::Template monkey patches in action_view/test_case 2010-01-05 11:48:06 -06:00
Joshua Peek
2601a16ede Autoload AS test case 2010-01-04 16:22:46 -06:00
David Heinemeier Hansson
e7ef57dd0d Merge 2009-12-22 17:31:29 -08:00
David Heinemeier Hansson
fe5f660413 Dont encourage __FILE__ bullshit 2009-12-22 17:25:34 -08:00
Joshua Peek
b1aee9f4ee All AD modules are "deferrable" 2009-12-22 17:11:21 -06:00
Joshua Peek
a1bf2f96ce AD::StatusCodes support is now part of rack 2009-12-22 16:08:03 -06:00
Joshua Peek
5f8e48cbd2 Move route reloading into railties 2009-12-14 17:54:41 -06:00
Joshua Peek
018dafe574 Allow autoloads to opt out of eager loading 2009-12-12 18:41:26 -06:00
Joshua Peek
ee395fe626 TestProcess belongs in AD 2009-12-12 18:09:44 -06:00
Joshua Peek
2f90d70049 Kill RouteSet#recognize 2009-12-10 23:45:04 -06:00
Yehuda Katz
96e0638ce2 Should fix a few Sam Ruby fails. 2009-12-03 09:06:01 -08:00
Joshua Peek
1004fcb767 Fixed AD assertion autoloads [#3470 state:resolved] 2009-11-09 21:38:01 -06:00
Joshua Peek
c1261b5484 Use Rails.application where we want a valid rack app 2009-10-16 19:04:28 -05:00
George Ogata
3de8b44b26 Make IntegrationTest::Runner propagate method_missing to ancestors.
Fixes RSpec integration example groups, which mixes its Matchers
module into ActiveSupport::TestCase.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-10-15 11:01:42 +13:00
Carl Lerche
420004e030 Initialize a new instance of Rails.application during integration tests
This is to fix the AWDWR tests until the application object is refactored to be a singleton.
2009-09-30 12:39:26 -07:00
Joshua Peek
a6757a02e1 Move middleware and route configuration from AC::Dispatcher to Rails application object 2009-09-26 21:59:28 -05:00
Joshua Peek
14866fa3d8 Allow setting a default application for all integration tests 2009-09-26 21:38:48 -05:00
Joshua Peek
acfeec5151 Allow integration test rack app to be set with "@app" ivar instead of using open_session 2009-09-26 20:51:05 -05:00
Joshua Peek
088ce2904d Fix generic url rewriter in integration tests 2009-09-25 11:10:39 -05:00
Joshua Peek
3fb623fa90 SessionRestoreError belongs in AD 2009-09-23 23:37:31 -05:00
Joshua Peek
4a55d1de8d Move integration test runner into ActionDispatch 2009-09-23 22:38:19 -05:00
Jon Wood
271baf235d Add :redirect to the testable RJS statements [#2612 state:resolved]
Example :
  assert_select_rjs :redirect, root_path

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 02:00:15 +01:00
Jeremy Kemper
249d9a6606 Depend on Hash#diff extension 2009-05-30 11:59:17 -07:00
Joshua Peek
11af089cee Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
2009-05-02 23:02:22 -05:00
Joshua Peek
f32cf44870 Switch functional tests to run through the rack interface instead of process 2009-05-02 15:29:18 -05:00
Joshua Peek
a8b75c480f Functional test runner finalizes response just like the integration test runner. In both runners, the @response object will now behave the same.
Some functional tests will need to be updated if they are relying on preprocessed data on the response.
2009-05-02 14:57:40 -05:00
Joshua Peek
3900f4007e Deprecate assert_redirect_to's partial hash matching 2009-05-02 14:23:44 -05:00
Joshua Peek
1fcc7dbcc8 Move TestRequest#query_parameters into AD TestRequest 2009-04-30 23:46:34 -05:00
Joshua Peek
a6fff94baf Move TestRequest cookies accessor into AD TestRequest 2009-04-30 19:23:50 -05:00
Joshua Peek
00d1a57e9f Start moving TestRequest and TestResponse into ActionDispatch 2009-04-30 17:26:03 -05:00
Joshua Peek
7b3b7cb2ab Move generic assertions into ActionDispatch 2009-04-30 11:55:53 -05:00