Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <web-client> network : write response body if validation fail to file for check
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Tue, 15 Sep 2009 15:51:52 +0200
  • Message-id: <E1Mo1sK-0001gj-PW@xxxxxxxxxxxxxxxx>
ref: refs/heads/network
commit 8d7a6d1f7342001aac602e62be0268007a82c188
Author: Josef Reidinger <jreidinger@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages