diff options
| author | Xavier Noria <fxn@hashref.com> | 2011-01-12 21:19:10 +0100 |
|---|---|---|
| committer | Xavier Noria <fxn@hashref.com> | 2011-01-12 21:19:10 +0100 |
| commit | 8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e (patch) | |
| tree | 68afb497f317dab1652defe0f96bd20051b572cf /actionpack/test/template/test_case_test.rb | |
| parent | 5bc98c9510a369a22b856cbe952d640f3825bb5c (diff) | |
| parent | 31293ba9d33f5b5f62ee760a548b4f5438183f22 (diff) | |
| download | rails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.tar.gz rails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.tar.bz2 rails-8b293e99ff2da0b5a60ff7bc5cde7bda9a2f715e.zip | |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'actionpack/test/template/test_case_test.rb')
| -rw-r--r-- | actionpack/test/template/test_case_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb index a745999622..203515d508 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionpack/test/template/test_case_test.rb @@ -116,6 +116,27 @@ module ActionView end end + class ControllerHelperMethod < ActionView::TestCase + module SomeHelper + def some_method + render :partial => 'test/from_helper' + end + end + + helper SomeHelper + + test "can call a helper method defined on the current controller from a helper" do + @controller.singleton_class.class_eval <<-EOF, __FILE__, __LINE__ + 1 + def render_from_helper + 'controller_helper_method' + end + EOF + @controller.class.helper_method :render_from_helper + + assert_equal 'controller_helper_method', some_method + end + end + class AssignsTest < ActionView::TestCase setup do ActiveSupport::Deprecation.stubs(:warn) |
