aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authortony <tony>2009-03-19 10:47:34 +0000
committertony <tony>2009-03-19 10:47:34 +0000
commit0bbb236b5c12320db52ff075c164861961eeae5e (patch)
tree4b4d009e53ab319354cb79be1b744afec3f4a2aa /spec/spec_helper.rb
parent76e135f2205faf5b6e0a7a979f060bf8a8ca01dd (diff)
Don't attempt to validate HTML if integrate_views isn't turned on (as it won't work)
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4400c0a28..8320a70a0 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -49,6 +49,9 @@ if $tempfilecount.nil?
# Call original process function
self.original_process(action, parameters, session, flash)
+ # XXX Is there a better way to check this than calling a private method?
+ return unless @response.template.controller.instance_eval { integrate_views? }
+
# 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