aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-18 08:46:06 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-18 08:46:06 +0000
commitb50adc72e533a9c20aca03063a676f6af4d32b85 (patch)
tree506e7f25effefb63ae7c8436497fd85ec0c5d410 /spec/spec_helper.rb
parent3affd6ab3d29bf2e86c9d4b00733499d060af20c (diff)
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.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb5
1 files changed, 5 insertions, 0 deletions
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