aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 43a67d304..8945bc7b2 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -44,8 +44,8 @@ if $tempfilecount.nil?
# Call original process function
self.original_process(action, parameters, session, flash)
- # And then if HTML, validate it
- if @response.content_type == "text/html" and @response.response_code != 302
+ # And then if HTML, not a redirect (302), and not a partial template (something/_something, such as in AJAX partial results)
+ if @response.content_type == "text/html" and @response.response_code != 302 and not @response.rendered_file.include?("/_")
$tempfilecount = $tempfilecount + 1
tempfilename = File.join(Dir::tmpdir, "railshtmlvalidate."+$$.to_s+"."+$tempfilecount.to_s+".html")
File.open(tempfilename, "w+") do |f|