From 9e8a2e96d743cdcfc92722d03b6aaedc8fbf84cf Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 13 Nov 2012 15:01:57 +0000 Subject: Updated to report success correctly --- worker/tests/http.rb | 5 ++--- worker/tests/https.rb | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'worker/tests') diff --git a/worker/tests/http.rb b/worker/tests/http.rb index 3796412..3988606 100755 --- a/worker/tests/http.rb +++ b/worker/tests/http.rb @@ -26,7 +26,7 @@ class HTTPTest # def initialize( data ) @test_data = data - @error = nil + @error = nil # # Ensure we have an URL @@ -42,7 +42,6 @@ class HTTPTest if ( @test_data["test_port"].nil? ) @error = "Missing port for the test." raise ArgumentError, @error - end end @@ -87,7 +86,7 @@ class HTTPTest end end - return true if ( @error.length() == 0 ) + return true if ( @error.nil? ) return false end diff --git a/worker/tests/https.rb b/worker/tests/https.rb index 55a423b..f0e4f4c 100755 --- a/worker/tests/https.rb +++ b/worker/tests/https.rb @@ -26,7 +26,7 @@ class HTTPSTest # def initialize( data ) @test_data = data - @error = nil + @error = nil # # Ensure we have an URL @@ -87,7 +87,7 @@ class HTTPSTest end end - return true if ( @error.length() == 0 ) + return true if ( @error.nil? ) return false end -- cgit v1.2.1