diff options
| author | Steve Kemp <steve@steve.org.uk> | 2012-12-07 11:30:19 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2012-12-07 11:30:19 +0000 | 
| commit | 5d26b821d3b6842ab458146dab6df3d64392969c (patch) | |
| tree | 8f6d74ea7bc4dd814399fac88664761dd1c0c412 /lib/custodian/protocoltest | |
| parent | f4cd4576a369b044cf6218aac3bcd0f46845c6ab (diff) | |
  When reporting on failure-types the HTTP/HTTPS test is often reported incorrectly.
  Fixed this now, based on the URL and added a test case.
Diffstat (limited to 'lib/custodian/protocoltest')
| -rw-r--r-- | lib/custodian/protocoltest/http.rb | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index 81113c0..6de74d3 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -91,7 +91,19 @@ module Custodian        end - +      # +      #  Get the right type of this object, based on the +      # URL +      # +      def get_type +        if ( @url =~ /^https:/ ) +          "https" +        elsif ( @url =~ /^http:/ ) +          "http" +        else +          raise ArgumentError, "URL isn't http/https: #{@url}" +        end +      end        #        # Allow this test to be serialized. | 
