From 685874da83a5bbadfcce4df80132c1342b74daaf Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 23 Jan 2005 16:37:58 +0000 Subject: [PATCH] when response is a file download, there is no need to check that it is well formed HTML (it's not, anyway) --- test/test_helper.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index ae4a364d..729aa96f 100755 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -102,12 +102,8 @@ if defined? $validate_xml_in_assert_success and $validate_xml_in_assert_success alias :__assert_success_before_ovverride_by_instiki :assert_success def assert_success __assert_success_before_ovverride_by_instiki - if @response.body.kind_of?(Proc) - body = @response.body.call - else - body = @response.body - end - assert_nothing_raised(body) { REXML::Document.new(body) } + if @response.body.kind_of?(Proc) then # it's a file download, not an HTML content + else assert_nothing_raised(@response.body) { REXML::Document.new(@response.body) } end end end end