Carlhuda
5797575bac
Stop setting UrlFor using SharedTestHelpers
2010-02-26 15:40:36 -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
a278f23310
Fix all of AP's tests with the non global router
2010-02-25 17:53:01 -08:00
Carlhuda
24ab5665b2
Revert "Fix test load paths for those not using bundler"
...
This reverts commit eec2d301d4 .
This commit broke tests. You cannot have a file called "bundler" on the load path.
2010-02-23 17:31:17 -08:00
Martin Schürrer
6bc24d40d5
Use ActionDispatch::Routing everywhere
2010-02-21 13:43:51 -08:00
José Valim
3f948a0e29
Merge master.
2010-02-17 00:48:04 +01:00
Prem Sichanugrist
f0523f72b4
Rename Rails::Subscriber to Rails::LogSubscriber
2010-02-16 22:36:15 +01:00
Joshua Peek
eec2d301d4
Fix test load paths for those not using bundler
2010-02-15 10:20:11 -06:00
José Valim
378464a2e4
Default to sync instrumentation.
2010-01-21 13:09:12 +01:00
José Valim
a8e25a518a
Move parameters to the top on logging.
2010-01-19 15:35:24 +01:00
José Valim
27d9836ad3
Add ActionDispatch::Railties::Subscriber and finish tidying up the logging.
2010-01-17 12:43:17 +01:00
José Valim
f921ad5c97
Tidy up ActiveRecord and Views runtime information on process action logger.
2010-01-14 01:07:03 +01:00
José Valim
01839834fd
ControllerRuntime tests also use Rails::Subscriber::TestHelper.
2010-01-13 01:19:24 +01:00
José Valim
f149eb19d4
From now on, parameters defined in default_url_options can be absent from named routes.
...
This allows the following setup to work:
# app/controllers/application_controller.rb
class ApplicationController
def default_url_options(options=nil)
{ :locale => I18n.locale }
end
end
# From your views and controllers:
I18n.locale #=> :en
users_url #=> "/en/users"
users_url(:pl) #=> "/pl/users"
user_url(1) #=> "/en/users/1"
user_url(:pl, 1) #=> "/pl/users/1"
user_url(1, :locale => :pl) #=> "/pl/users/1"
If you provide all expected parameters, it still works as previously.
But if any parameter is missing, it tries to assign all possible ones
with the hash returned in default_url_options or the one passed straight
to the named route method.
Beware that default_url_options in ApplicationController is not shared
with ActionMailer, so you are required to always give the locale in your
email views.
2010-01-07 15:34:14 +01:00
José Valim
f2d276fefd
Ensure no notification is on the queue before running notifications related tests.
2010-01-03 23:39:09 +01:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
Jeremy Kemper
c4c2502df8
Fix controller runtime test
2009-12-30 22:15:02 -08:00
José Valim
4ecdf24bde
Kick AR logging back to life and move ControllerRuntime inside ActiveRecord::Rails.
2009-12-30 13:07:48 +01:00
Joshua Peek
2be5e088d2
Use new routing dsl in tests
2009-12-08 16:52:26 -06:00
José Valim
427a7385eb
Make polymorphic_url work with symbols again and refactor it [ #1384 status:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-10-28 14:13:48 -05:00
Joshua Peek
84e94551f6
Add custom "with_routing" to internal tests to fix reseting session after using
...
with_routing. This only affects our internal AP tests.
2009-10-03 20:45:49 -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
0c638b3406
Clean up session integration tests so they don't reference AC::Dispatcher
2009-09-26 12:56:53 -05:00
Joshua Peek
314e18aba2
Need to reset session for AR session tests after altering the route set
2009-09-06 23:09:47 -05:00
Joshua Peek
ba5995dcd9
Reset session in integration tests after changing routes to reload the middleware stack
2009-08-27 12:43:26 -05:00
Niklas Holmgren
c284412b14
Polymorphic routes generates collection URL from model class [ #1089 state:resolved]
...
Signed-off-by: Dan Pickett <dpickett@enlightsolutions.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:00:29 +01:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
Joshua Peek
92c00d7586
AMo conversion helper
2009-07-21 00:51:57 -05:00
Yehuda Katz
5ffaaa71d1
Define ActiveModel API Compliance
...
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
2009-07-20 00:27:04 +09:00
=?utf-8?q?Mislav=20Marohni=C4=87?=
21cd4c0e93
Fix polymorphic_path doesn't modify options hash [ #2099 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 17:53:07 +01:00
Joshua Peek
1c4d28ba31
Move model naming into ActiveModel
2009-06-17 10:37:39 -05:00
Joshua Peek
a1140a1031
Revert "Only save the session if we're actually writing to it [ #2703 state:resolved]"
...
This reverts commit dd98280e38 .
2009-05-30 09:36:08 -05:00
Johan Sörensen
dd98280e38
Only save the session if we're actually writing to it [ #2703 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-05-28 09:35:17 -05:00
Joshua Peek
01d7acd11d
Fix reset_session with ActiveRecord store [ #2200 state:resolved]
2009-05-17 14:42:36 -05:00
Yehuda Katz + Carl Lerche
b6bac73b28
Merge commit 'origin/master'
...
Conflicts:
actionpack/lib/action_controller/abstract/base.rb
actionpack/lib/action_controller/routing.rb
2009-05-14 17:38:30 -07:00
Jeremy Kemper
e44cd41620
Make it clearer that session is nil
2009-04-26 23:59:17 -07:00
Mike Gunderloy
398b07e655
Remove excess mocking from polymorphic_url tests [ #2330 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-04-21 14:32:52 +01:00
Luca Guidi
42cdc7571d
Ensure SqlBypass use ActiveRecord::Base connection
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#https://rails.lighthouseapp.com/attachments/106066/0001-Ensure-SqlBypass-use-ActiveRecord-Base-connection.patch state:committed]
2009-04-05 21:00:50 +12:00
Joshua Peek
224a534400
reset_session should force a new session id to be generated [ #2173 ]
2009-03-09 22:46:03 -05:00
Joshua Peek
9b1b88f09c
Fixed reset_session for ActiveRecord session store [ #2108 state:resolved]
2009-03-03 13:07:03 -06:00
Jeremy Kemper
57cca81cae
Don't depend on project.developers ordering
2009-02-21 21:17:17 -08:00
Joshua Peek
ed70830713
Switch to Rack based session stores.
2008-12-15 16:33:31 -06:00
Joshua Peek
31ce92f7b5
Use autoload instead of explicit requires for ActionController
2008-11-23 16:35:47 -06:00
Jeremy Kemper
4af46c4ba1
Update AR integration tests for TestCase changes
2008-11-07 15:51:50 -05:00
Jeremy Kemper
c82e8e1f48
Move controller assertions from base TestCase to AC:: and AV::TestCase
2008-11-07 15:42:34 -05:00
Ryan Bates
9a5ffaa01e
Ensure :partial => @collection and :collection => @collection behaves same. [ #884 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-22 18:15:53 +01:00
Joshua Peek
30204c4e66
Set global ActionController::Base.view_paths for test cases
2008-07-12 14:11:51 -05:00
Joshua Peek
b603de0882
Improve test coverage and create fixtures for RenderPartialWithRecordIdentificationTests
2008-07-12 12:17:10 -05:00
Joshua Peek
339491a6b3
Set precompiled fixture load path constant to speed up tests
2008-06-25 15:24:12 -05:00
Jacek Becela
a7ea06b4eb
Make render shorthands work with namespaced controllers
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-10 11:28:19 +01:00