aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorErik Ostrom <erik@echographia.com>2009-09-28 13:31:30 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-28 13:31:30 -0500
commit8ffc2e3b8de38c485fa24820208b40920dad7ae3 (patch)
tree2eb4160ef48ce6898e0b43f3ab5ed47be4b7dcdd /actionpack/lib/action_controller
parent1696039f29103a6b6bf1e7c274928b302c8c9f31 (diff)
downloadrails-8ffc2e3b8de38c485fa24820208b40920dad7ae3.tar.gz
rails-8ffc2e3b8de38c485fa24820208b40920dad7ae3.tar.bz2
rails-8ffc2e3b8de38c485fa24820208b40920dad7ae3.zip
Ported the new ActionView::TestCase from 2-3-stable to master [#3260
state:resolved] The test case now mimicks the template environment more closely, so it's possible to use render, load helper dependencies. This also fixes assert_select, and similar assertions. Because view tests and helpers generally don't render full templates assert_select looks first in rendered and then in output_buffer to find the rendered output. Additional `master'-only changes: Made the Action Pack Rakefile run the ActionView::TestCase tests, and made ActionView::Rendering#_render_text always return a string. Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/testing/test_case.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/testing/test_case.rb b/actionpack/lib/action_controller/testing/test_case.rb
index c37898188e..178e3477a6 100644
--- a/actionpack/lib/action_controller/testing/test_case.rb
+++ b/actionpack/lib/action_controller/testing/test_case.rb
@@ -10,7 +10,7 @@ module ActionController
self.session_options = TestSession::DEFAULT_OPTIONS.merge(:id => ActiveSupport::SecureRandom.hex(16))
end
- def assign_parameters(controller_path, action, parameters)
+ def assign_parameters(controller_path, action, parameters = {})
parameters = parameters.symbolize_keys.merge(:controller => controller_path, :action => action)
extra_keys = ActionController::Routing::Routes.extra_keys(parameters)
non_path_parameters = get? ? query_parameters : request_parameters