From b50adc72e533a9c20aca03063a676f6af4d32b85 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Wed, 18 Jan 2012 08:46:06 +0000 Subject: Fix paging bug for type ahead search. This wasn't caught because the spec didn't call "integrate_views", so the rendering part was mocked by RSpec instead of executed. --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6c3a947ba..8dabfce7f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -144,7 +144,12 @@ if $tempfilecount.nil? return unless @response.template.controller.instance_eval { integrate_views? } # And then if HTML, not a redirect (302, 301) if @response.content_type == "text/html" && ! [301,302,401].include?(@response.response_code) + if @response.template.instance_eval("@_memoized__pick_partial_template").nil? validate_html(@response.body) + else + # it's a partial + validate_as_body(@response.body) + end end end end -- cgit v1.2.3