Permalink
Browse files

use assert_includes rather than calling includes? specifically

  • Loading branch information...
1 parent d971a1c commit 6a383f4b481d8ae76acb53e2d2defb2b91288485 @tenderlove tenderlove committed Jan 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_controller/test_case.rb
@@ -93,7 +93,7 @@ def assert_template(options = {}, message = nil)
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 @@ def assert_template(options = {}, message = nil)
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?,

0 comments on commit 6a383f4

Please sign in to comment.