diff options
author | Matthias Hecker <mail@apoc.cc> | 2020-03-29 13:01:22 +0200 |
---|---|---|
committer | Matthias Hecker <mail@apoc.cc> | 2020-03-29 13:01:22 +0200 |
commit | 9c6d7ae907980870f364b2c8d4282fbc270cb202 (patch) | |
tree | e177917ac32437865f6cb0ea1583d430a9d8e1b2 | |
parent | 96af88934da7973be4ac2123f08e02ee3ac65829 (diff) |
test: optional registry adapter tests
-rw-r--r-- | test/test_registry.rb | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/test/test_registry.rb b/test/test_registry.rb index 1f25f89d..097852aa 100644 --- a/test/test_registry.rb +++ b/test/test_registry.rb @@ -278,29 +278,35 @@ module RegistryTestModule end end -class RegistryDBMTest < Test::Unit::TestCase - include RegistryTestModule - include RegistryHashInterfaceTests - - def initialize(o) - super o - @format = 'dbm' - Irc::Bot::Registry.new(@format) - @registry_class = Irc::Bot::Registry::DBMAccessor +begin + require 'dbm' + class RegistryDBMTest < Test::Unit::TestCase + include RegistryTestModule + include RegistryHashInterfaceTests + + def initialize(o) + super o + @format = 'dbm' + Irc::Bot::Registry.new(@format) + @registry_class = Irc::Bot::Registry::DBMAccessor + end end -end +rescue Exception; end -class RegistryTCTest < Test::Unit::TestCase - include RegistryTestModule - include RegistryHashInterfaceTests +begin + require 'tc' + class RegistryTCTest < Test::Unit::TestCase + include RegistryTestModule + include RegistryHashInterfaceTests - def initialize(o) - super o - @format = 'tc' - Irc::Bot::Registry.new(@format) - @registry_class = Irc::Bot::Registry::TokyoCabinetAccessor + def initialize(o) + super o + @format = 'tc' + Irc::Bot::Registry.new(@format) + @registry_class = Irc::Bot::Registry::TokyoCabinetAccessor + end end -end +rescue Exception; end begin require 'daybreak' |