HAYASHI Kentaro
null+****@clear*****
Thu Apr 2 18:17:22 JST 2015
HAYASHI Kentaro 2015-04-02 18:17:22 +0900 (Thu, 02 Apr 2015) New Revision: ebfbc54a13bcd3e311439a5daf23155ecb0c2d93 https://github.com/ranguba/rroonga/commit/ebfbc54a13bcd3e311439a5daf23155ecb0c2d93 Message: Add test to unregister plugin Modified files: test/test-plugin.rb Modified: test/test-plugin.rb (+18 -0) =================================================================== --- test/test-plugin.rb 2015-04-03 14:51:52 +0900 (9cb513f) +++ test/test-plugin.rb 2015-04-02 18:17:22 +0900 (bd4dd02) @@ -34,4 +34,22 @@ class PluginTest < Test::Unit::TestCase File.exist?(plugin_path) end end + + class UnregisterTest < self + def test_by_name + context = Groonga::Context.default + context.register_plugin("token_filters/stop_word") + context.unregister_plugin("token_filters/stop_word") + assert_nil(context["TokenFilterStopWord"]) + end + + def test_by_path + context = Groonga::Context.default + plugin_path = "#{Groonga::Plugin.system_plugins_dir}/" + plugin_path << "token_filters/stop_word#{Groonga::Plugin.suffix}" + context.register_plugin(plugin_path) + context.unregister_plugin(plugin_path) + assert_nil(context["TokenFilterStopWord"]) + end + end end -------------- next part -------------- HTML����������������������������...Download