From 6a383f4b481d8ae76acb53e2d2defb2b91288485 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 6 Jan 2012 10:35:06 -0800 Subject: use assert_includes rather than calling includes? specifically --- actionpack/lib/action_controller/test_case.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index e96ff82a5a..17f978d52e 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -93,7 +93,7 @@ module ActionController case expected_layout when String - assert(@layouts.keys.include?(expected_layout), msg) + assert_includes @layouts.keys, expected_layout, msg when Regexp assert(@layouts.keys.any? {|l| l =~ expected_layout }, msg) when nil @@ -117,7 +117,7 @@ module ActionController msg = build_message(message, "expecting partial but action rendered ", options[:partial], @partials.keys) - assert(@partials.include?(expected_partial), msg) + assert_includes @partials, expected_partial, msg end else assert @partials.empty?, -- cgit v1.2.3