Skip to content

Commit

Permalink
Check partial_rendered_times to clarify expectations.
Browse files Browse the repository at this point in the history
It was difficult to see when the partials were rendered, and how many times
we expected it to be rendered before. Because we weren't explaining it.
  • Loading branch information
kaspth committed Feb 12, 2016
1 parent 3f70e8b commit 29e5c20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion actionpack/test/controller/caching_test.rb
Expand Up @@ -417,8 +417,11 @@ def test_collection_fetches_cached_views

def test_preserves_order_when_reading_from_cache_plus_rendering
get :index, params: { id: 2 }
get :index_ordered
assert_equal 1, @controller.partial_rendered_times
assert_select ':root', 'david, 2'

get :index_ordered
assert_equal 3, @controller.partial_rendered_times
assert_select ':root', "david, 1\n david, 2\n david, 3"
end

Expand Down

0 comments on commit 29e5c20

Please sign in to comment.