aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/caching_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r--actionpack/test/controller/caching_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index f6264c0954..5157454be0 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -616,8 +616,10 @@ class FragmentCachingTest < ActionController::TestCase
@store.write('views/expensive', 'fragment content')
fragment_computed = false
+ view_context = @controller.view_context
+
buffer = 'generated till now -> '.html_safe
- buffer << @controller.fragment_for('expensive') { fragment_computed = true }
+ buffer << view_context.send(:fragment_for, 'expensive') { fragment_computed = true }
assert fragment_computed
assert_equal 'generated till now -> ', buffer
@@ -627,8 +629,10 @@ class FragmentCachingTest < ActionController::TestCase
@store.write('views/expensive', 'fragment content')
fragment_computed = false
+ view_context = @controller.view_context
+
buffer = 'generated till now -> '.html_safe
- buffer << @controller.fragment_for('expensive') { fragment_computed = true }
+ buffer << view_context.send(:fragment_for, 'expensive') { fragment_computed = true }
assert !fragment_computed
assert_equal 'generated till now -> fragment content', buffer