Yehuda Katz + Carl Lerche
8a4e77b420
OMG, a lot of work
2009-05-01 17:31:01 -07:00
Joshua Peek
05bd863c02
alias method chain process with test
2009-04-30 23:46:35 -05:00
Joshua Peek
1fcc7dbcc8
Move TestRequest#query_parameters into AD TestRequest
2009-04-30 23:46:34 -05:00
Joshua Peek
0fa1e75d41
Set rack.input instead of RAW_POST_DATA in TestRequest
2009-04-30 20:04:55 -05:00
Joshua Peek
261ec996de
Missed stray @request_uri
2009-04-30 19:36:18 -05:00
Joshua Peek
a6fff94baf
Move TestRequest cookies accessor into AD TestRequest
2009-04-30 19:23:50 -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
64e66cf161
Vendor new Rack::Mock changes
2009-04-30 14:40:46 -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
ba9887c9c0
Switch to action_dispatch rack namespace
2009-04-30 13:45:12 -05:00
Joshua Peek
7b3b7cb2ab
Move generic assertions into ActionDispatch
2009-04-30 11:55:53 -05:00
Joshua Peek
98dd726687
Test::Unit work arounds are handled by ActiveSupport
2009-04-30 11:42:01 -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
Joshua Peek
d63b42da36
Move header injection back into integration tests
2009-04-28 23:29:46 -05:00
Joshua Peek
afa7d7ff05
Fix validate_request method name
2009-04-28 23:29:45 -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
5cef0cbad2
Check for to_str rather than String
2009-04-26 19:08:04 -07:00
Jeremy Kemper
f7d7dc5aa8
Use session= writer methods
2009-04-26 17:19:14 -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
c8919f4c7c
Require an ActionDispatch::Request to use response assertions
2009-04-26 11:52:45 -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
Joshua Peek
5352a2417b
Move useful response test helpers into request
2009-04-26 11:12:33 -05:00
Joshua Peek
4f412a10b6
Remove RewindableInput middleware since all input MUST be rewindable according to a recent change in the Rack 1.0 SPEC
2009-04-25 14:04:03 -05:00
Joshua Peek
044794fc9e
Remove pending rack specifications until they are official
2009-04-25 13:41:30 -05: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
Yehuda Katz + Carl Lerche
0a132c2fe1
Refactor ActionView::Path
...
* Decouple from ActionController and ActionMailer
* Bring back localization support.
* Prepare to decouple templates from the filesystem.
* Prepare to decouple localization from ActionView
* Fix ActionMailer to take advantage of ActionView::Path
2009-04-22 17:24:41 -07:00
Jeremy Kemper
70c544df71
Rack::Utils.body_to_s doesn't exist in 1.0
2009-04-22 00:22:07 -07:00
Jeremy Kemper
f49e344128
Reinstate Base#render_to_string. Introduce AbstractController#render_to_string which stringifies render_to_body.
2009-04-21 16:02:30 -07:00
Jeremy Kemper
a22a778f86
render_for_text pushes a body part instead of replacing the whole body
2009-04-17 21:33:09 -05:00
Jeremy Kemper
1414e2afbb
Don't set Content-Length in Base#response_body= since body may be any Rack-compatible body. Leave it up to the content length middleware.
2009-04-17 18:36:28 -05:00
Jeremy Kemper
df42d26f99
Rename render_to_string to render_to_body since it may return any Rack-compatible body, not just strings
2009-04-17 18:34:49 -05:00
lifo
5b92dcb675
Merge docrails
2009-04-17 14:28:46 +01: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
Joshua Peek
c2511f936e
Make dispatcher instances immutable
2009-04-14 18:32:31 -07:00
Joshua Peek
d7751036fa
Final blow to CGI
2009-04-14 18:32:31 -07:00
Joshua Peek
9954494397
Move MimeResponds into base folder
2009-04-14 17:08:38 -05:00
Joshua Peek
d7396b5ca9
Move reloader middleware in ActionDispatch
2009-04-14 17:06:32 -05:00
Joshua Peek
1d2686517c
Session management belongs in base folder
2009-04-14 17:02:38 -05:00
Joshua Peek
13bb6a9a99
Backwords compat alias for ActionController::Request and ActionController::Response
2009-04-14 16:55:10 -05:00
Joshua Peek
c1b4a5eb56
Make dispatcher instances immutable
2009-04-14 16:21:06 -05:00
Joshua Peek
4a3afe0b4f
Final blow to CGI
2009-04-14 16:18:24 -05:00
Joshua Peek
4839fe2e82
Move bundled rack into ActionDispatch
2009-04-14 15:52:23 -05:00