diff options
author | francis <francis> | 2009-09-02 15:28:24 +0000 |
---|---|---|
committer | francis <francis> | 2009-09-02 15:28:24 +0000 |
commit | 3e0b50e2ac0446afdc383cf4a9ae17fbc13d8aa0 (patch) | |
tree | 85815a64b81bbfb58dcc9f00e8180fb96e8272b3 | |
parent | 496972afdc9787f67d754029fe15af14011829b3 (diff) |
Handle 301 redirects
-rw-r--r-- | spec/spec_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2af585d7a..9d5e1ef54 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -79,8 +79,8 @@ if $tempfilecount.nil? # 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?("/_") + # And then if HTML, not a redirect (302, 301), and not a partial template (something/_something, such as in AJAX partial results) + if @response.content_type == "text/html" && (@response.response_code != 302) && (@response.response_code != 301) && (@response.rendered_file.nil? || !@response.rendered_file.include?("/_")) validate_html(@response.body) end end |