diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/custodian/protocoltest/ldap.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/custodian/protocoltest/ldap.rb b/lib/custodian/protocoltest/ldap.rb index dfe1cc8..53257a0 100644 --- a/lib/custodian/protocoltest/ldap.rb +++ b/lib/custodian/protocoltest/ldap.rb @@ -1,5 +1,4 @@ -require 'ldap' # # The LDAP-protocol test. @@ -75,7 +74,6 @@ module Custodian - # # Allow this test to be serialized. # @@ -91,6 +89,13 @@ module Custodian # def run_test + begin + require 'ldap' + rescue LoadError + @error = "LDAP library not available - test disabled" + return false + end + # reset the error, in case we were previously executed. @error = nil @@ -145,8 +150,6 @@ module Custodian register_test_type "ldap" - - + end end end -end |