Commit Graph

1217 Commits

Author SHA1 Message Date
Yehuda Katz + Carl Lerche
da65320433 Got new base to pass controller/base_test.rb, implemented method_missing action semantics in compatibility mode, and fixed a few action_missing bugs. 2009-05-14 17:25:10 -07:00
Yehuda Katz + Carl Lerche
8fac2c88ca Cleaning up more render tests 2009-05-14 15:30:35 -07:00
Yehuda Katz + Carl Lerche
49a84ff69c Ported over render :file tests. 2009-05-13 17:00:59 -07:00
Jeremy Kemper
e8550ee032 Cherry-pick core extensions 2009-05-13 12:00:15 -07:00
Yehuda Katz + Carl Lerche
216309c165 Implemented redirects and partial rendering in new base. 2009-05-12 16:21:34 -07:00
Yehuda Katz + Carl Lerche
00a9d4b91c Merge branch 'master' into wip_abstract_controller
Conflicts:
	actionpack/lib/action_controller/abstract/callbacks.rb
	actionpack/lib/action_controller/abstract/renderer.rb
	actionpack/lib/action_controller/base/base.rb
	actionpack/lib/action_controller/dispatch/dispatcher.rb
	actionpack/lib/action_controller/routing/route_set.rb
	actionpack/lib/action_controller/testing/process.rb
	actionpack/test/abstract_controller/layouts_test.rb
	actionpack/test/controller/filters_test.rb
	actionpack/test/controller/helper_test.rb
	actionpack/test/controller/render_test.rb
	actionpack/test/new_base/test_helper.rb
2009-05-11 17:07:05 -07:00
Yehuda Katz + Carl Lerche
6694bd46f5 Aliased AbstractController::ActionNotFound to ActionController::UnknownAction 2009-05-11 12:45:26 -07:00
Yehuda Katz + Carl Lerche
94ee9d2452 Ported ConditionalGet to new Base 2009-05-11 12:04:43 -07:00
Joshua Peek
d4402c5554 assert_redirect_to's partial hash matching was deprecated in 2-3 stable 7f1f16c01 2009-05-04 20:26:43 -05: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
24affdc88c Deprecate Controller.process interface 2009-05-02 15:37:29 -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
Yehuda Katz
72160d9f89 Implement FooController.action(:name)
* Rails actions are now Rack endpoints, and can be retrieved
    via FooController.action(name) and called with an env
  * Updated some tests that relied on the old internal
    #process/#call implementation
2009-05-02 02:15:09 -07:00
Yehuda Katz + Carl Lerche
b1d34b3aa4 Starting to get new_base to run on old tests 2009-05-01 17:31:03 -07:00
Yehuda Katz + Carl Lerche
69fd669165 Committing the last changes before we start trying to get the old tests to pass on the new base 2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
4ee3e5b094 Ported over the concept of public instance methods on controller child classes as callable action methods 2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
b98e496c03 Support implicit and explicit content types 2009-05-01 17:31:02 -07:00
Yehuda Katz + Carl Lerche
0c3d9bc4c2 Ported over render :template tests 2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
4f68311685 Finished implementing render :text in Base2 2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
1b45991603 Renamed the new_base tests 2009-05-01 17:31:01 -07:00
Yehuda Katz + Carl Lerche
8a4e77b420 OMG, a lot of work 2009-05-01 17:31:01 -07:00
Ruy Asan
3be3470fab Added routing test for irregular ID requirements and custom member action.
[#2595 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-05-01 15:02:32 -07:00
Joshua Peek
664ae187a9 Update some old tests to use AC TestProcess 2009-04-30 23:46:35 -05:00
Joshua Peek
05bd863c02 alias method chain process with test 2009-04-30 23:46:35 -05:00
Jeremy Kemper
6ae839bf48 Merge branch 'master' of git@github.com:rails/rails 2009-04-30 16:45:39 -07:00
John F. Douthat
e59835bd09 Fix action-cached exception responses.
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.

[#2533 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-04-30 16:43:01 -07:00
Jeremy Kemper
f0b9e28619 Fix render :json => nil [#2589 state:resolved] 2009-04-30 16:34:00 -07:00
Joshua Peek
00d1a57e9f Start moving TestRequest and TestResponse into ActionDispatch 2009-04-30 17:26:03 -05:00
Joshua Peek
9bac470c7a Group integration test helpers and delegate other helpers to request and response objects 2009-04-30 14:28:42 -05:00
Joshua Peek
988513ac7a Framework backtrace cleaning is handled by ActiveSupport now 2009-04-30 11:42:01 -05:00
Joshua Peek
c0a372ba87 Deprecate template, session, assigns, and layout accessors on response object. Instead access them through the controller instance. This mainly affects functional test assertions. 2009-04-28 23:29:46 -05:00
Yehuda Katz + Carl Lerche
cecafc52ee Refactor ActionView::Template
ActionView::Template is now completely independent from template
  storage, which allows different back ends such as the database.
  ActionView::Template's only responsibility is to take in the
  template source (passed in from ActionView::Path), compile it,
  and render it.
2009-04-27 11:49:11 -07:00
Joshua Peek
21aa32692c Delegate controller.session to request.session and deprecate response session 2009-04-27 13:11:17 -05:00
Jeremy Kemper
a88ddf8cc3 Don't return bare string as rack body 2009-04-27 00:00:03 -07:00
Jeremy Kemper
5577d561f9 Merge branch 'master' of git@github.com:rails/rails 2009-04-26 15:18:51 -07:00
Joshua Peek
0494909679 Inherit TestSession from Session::AbstractStore and add indifferent access to Session::AbstractStore. 2009-04-26 14:33:57 -05:00
Joshua Peek
6940c0de12 Unify functional and integration tests cookie helpers 2009-04-26 11:37:11 -05:00
Joshua Peek
5ea8d40156 Deprecate response.redirect_url_match?, use assert_match instead. 2009-04-26 11:16:14 -05:00
Jeremy Kemper
dc2caea9dc test uses Pathname 2009-04-24 23:17:15 -07:00
Joshua Peek
dd2ed32418 Start to integrate some of the features in Rack::Test.
Eventually commit ActionDispatch::Test::MockRequest and ActionDispatch::Test:: UploadedFile upstream.
2009-04-24 20:24:54 -05:00
rick
3c4c6bd0df * Add pluggable JSON backends with support for the JSON gem. [rick]
Example: ActiveSupport::JSON.backend = "JSONGem"

  All internal Rails JSON encoding is now handled by ActiveSupport::JSON.encode().  Use of #to_json is not recommended, as it may clash with other libraries that overwrite it.  However, you can recover Rails specific functionality
  if you really want to use #to_json.

    gem 'json'
    ActiveSupport::JSON.backend = "JSONGem"

    class ActiveRecord::Base
      alias to_json rails_to_json
    end
2009-04-23 00:08:40 -07:00
Joshua Peek
380431e4ed Fix test_rescue_routing_exceptions when running with rake 2009-04-21 21:11:23 -05:00
Joshua Peek
0b92bb97c1 refactor some coupled rescue tests 2009-04-21 20:41:31 -05:00
Joshua Peek
fc5c1b0e90 Session tests belong under dispatch folder 2009-04-21 19:57:18 -05: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
Mislav Marohnić
7ce0778a15 Always buffer rack.input if it is not rewindable
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-17 21:53:44 -05:00
Ross Kaffenburger and Bryan Helmkamp
256b0ee8e3 Don't check authenticity tokens for any AJAX requests 2009-04-15 16:04:21 -07:00
Carl Lerche & Yehuda Katz
3c1187699a Makes rails-dev-boost work again 2009-04-14 18:32:31 -07:00