ref: refs/heads/network
commit 8d7a6d1f7342001aac602e62be0268007a82c188
Author: Josef Reidinger
Date: Tue Sep 15 15:51:52 2009 +0200
write response body if validation fail to file for check
---
webclient/test/validation_assert.rb | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/webclient/test/validation_assert.rb b/webclient/test/validation_assert.rb
index f5f88ef..8f903d9 100644
--- a/webclient/test/validation_assert.rb
+++ b/webclient/test/validation_assert.rb
@@ -25,7 +25,14 @@ class ActionController::TestCase
if output =~ /^(\d+) warnings*, (\d+) errors*/
warns = $1.to_i
errors = $2.to_i
- assert (errors == 0 and warns == 0), "#{errors} validation errors and #{warns} warnings found:\n#{messages.map{ |x| "- #{x}"}.join("\n")}"
+ unless (errors == 0 and warns == 0)
+ File.open("tidy-failed.html","w+") do
+ |file|
+ file.puts markup
+ end
+ end
+ assert (errors == 0 and warns == 0), "#{errors} validation errors and #{warns} warnings found:\n#{messages.map{ |x| "- #{x}"}.join("\n")} \n
+ See #{Dir.pwd}/tidy-failed.html"
end
end
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org