@@ -249,8 +249,6 @@ def test_simple_action_not_cached
249
249
assert_not_equal cached_time , @response . body
250
250
end
251
251
252
- include RackTestUtils
253
-
254
252
def test_action_cache_with_layout
255
253
draw do
256
254
get '/action_caching_test/with_layout' , to : 'action_caching_test#with_layout'
@@ -265,8 +263,7 @@ def test_action_cache_with_layout
265
263
get :with_layout
266
264
assert_response :success
267
265
assert_not_equal cached_time , @response . body
268
- body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/with_layout' ) )
269
- assert_equal @response . body , body
266
+ assert_equal @response . body , read_fragment ( 'hostname.com/action_caching_test/with_layout' )
270
267
end
271
268
272
269
def test_action_cache_with_layout_and_layout_cache_false
@@ -283,8 +280,7 @@ def test_action_cache_with_layout_and_layout_cache_false
283
280
get :layout_false
284
281
assert_response :success
285
282
assert_not_equal cached_time , @response . body
286
- body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/layout_false' ) )
287
- assert_equal cached_time , body
283
+ assert_equal cached_time , read_fragment ( 'hostname.com/action_caching_test/layout_false' )
288
284
end
289
285
290
286
def test_action_cache_with_layout_and_layout_cache_false_via_proc
@@ -301,8 +297,7 @@ def test_action_cache_with_layout_and_layout_cache_false_via_proc
301
297
get :with_layout_proc_param , params : { layout : false }
302
298
assert_response :success
303
299
assert_not_equal cached_time , @response . body
304
- body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' ) )
305
- assert_equal cached_time , body
300
+ assert_equal cached_time , read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' )
306
301
end
307
302
308
303
def test_action_cache_with_layout_and_layout_cache_true_via_proc
@@ -319,8 +314,7 @@ def test_action_cache_with_layout_and_layout_cache_true_via_proc
319
314
get :with_layout_proc_param , params : { layout : true }
320
315
assert_response :success
321
316
assert_not_equal cached_time , @response . body
322
- body = body_to_string ( read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' ) )
323
- assert_equal @response . body , body
317
+ assert_equal @response . body , read_fragment ( 'hostname.com/action_caching_test/with_layout_proc_param' )
324
318
end
325
319
326
320
def test_action_cache_conditional_options
0 commit comments