This method is deprecated or moved on the latest stable version.
The last existing version (v1.1.6) is shown here.
assert_template(expected = nil, message=nil)
public
Asserts that the request was rendered with the appropriate template file.
# File actionpack/lib/action_controller/assertions.rb, line 108
def assert_template(expected = nil, message=nil)
clean_backtrace do
rendered = expected ? @response.rendered_file(!expected.include?('/')) : @response.rendered_file
msg = build_message(message, "expecting <?> but rendering with <?>", expected, rendered)
assert_block(msg) do
if expected.nil?
[email protected]_with_file?
else
expected == rendered
end
end
end
end