diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-04-29 17:32:39 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-01 17:31:02 -0700 |
commit | 49834e088bf8d02a4f75793a42868f2aea8749a4 (patch) | |
tree | 314643bcdaabd64780f027756ca4710c6a2d72ac /actionpack/test/new_base/test_helper.rb | |
parent | 0c3d9bc4c2b329cb754bfed1e465f99d058e1193 (diff) | |
download | rails-49834e088bf8d02a4f75793a42868f2aea8749a4.tar.gz rails-49834e088bf8d02a4f75793a42868f2aea8749a4.tar.bz2 rails-49834e088bf8d02a4f75793a42868f2aea8749a4.zip |
Support implicit render and blank render
Diffstat (limited to 'actionpack/test/new_base/test_helper.rb')
-rw-r--r-- | actionpack/test/new_base/test_helper.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/new_base/test_helper.rb b/actionpack/test/new_base/test_helper.rb index b40cbb163f..03af5a66a6 100644 --- a/actionpack/test/new_base/test_helper.rb +++ b/actionpack/test/new_base/test_helper.rb @@ -58,11 +58,31 @@ module ActionController end end + def render(action = action_name, options = {}) + if action.is_a?(Hash) + options, action = action, nil + else + options.merge! :action => action + end + + super(options) + end + def render_to_body(options = {}) options = {:template => options} if options.is_a?(String) super end + def process_action + ret = super + render if response_body.nil? + ret + end + + def respond_to_action?(action_name) + super || view_paths.find_by_parts(action_name, {:formats => formats, :locales => [I18n.locale]}, controller_path) + end + # append_view_path File.join(File.dirname(__FILE__), '..', 'fixtures') CORE_METHODS = self.public_instance_methods |