diff options
author | wycats <wycats@gmail.com> | 2010-03-19 18:04:00 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-19 18:46:29 -0700 |
commit | e1c030edd8362bceab287523fba7ec6a76aa9beb (patch) | |
tree | 4a50bbbc9395bbaa504b506e923c4d1de2351156 /actionpack/test/controller/caching_test.rb | |
parent | 80095c54bdf134da1aaaca75653e7316bbcbdf70 (diff) | |
download | rails-e1c030edd8362bceab287523fba7ec6a76aa9beb.tar.gz rails-e1c030edd8362bceab287523fba7ec6a76aa9beb.tar.bz2 rails-e1c030edd8362bceab287523fba7ec6a76aa9beb.zip |
Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack response was a String.
Diffstat (limited to 'actionpack/test/controller/caching_test.rb')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 5157454be0..f0ad652d50 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -285,6 +285,8 @@ class ActionCacheTest < ActionController::TestCase assert_not_equal cached_time, @response.body end + include RackTestUtils + def test_action_cache_with_layout get :with_layout cached_time = content_to_cache @@ -294,8 +296,8 @@ class ActionCacheTest < ActionController::TestCase get :with_layout assert_not_equal cached_time, @response.body - - assert_equal @response.body, read_fragment('hostname.com/action_caching_test/with_layout') + body = body_to_string(read_fragment('hostname.com/action_caching_test/with_layout')) + assert_equal @response.body, body end def test_action_cache_with_layout_and_layout_cache_false @@ -308,7 +310,8 @@ class ActionCacheTest < ActionController::TestCase get :layout_false assert_not_equal cached_time, @response.body - assert_equal cached_time, read_fragment('hostname.com/action_caching_test/layout_false') + body = body_to_string(read_fragment('hostname.com/action_caching_test/layout_false')) + assert_equal cached_time, body end def test_action_cache_conditional_options |