class Spec::Rails::Matchers::RenderTemplate
def matches?(response)
def matches?(response) if response.respond_to?(:rendered_file) @actual = response.rendered_file else @actual = response.rendered_template.to_s end return false if @actual.blank? given_controller_path, given_file = path_and_file(@actual) expected_controller_path, expected_file = path_and_file(@expected) given_controller_path == expected_controller_path && given_file.match(expected_file) end