[Groonga-commit] ranguba/rroonga at 5058dee [plugin-unregister] Add test to unregister plugin

Back to archive index

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: 5058deeecae407cb193b75e4e49aef854017347a
  https://github.com/ranguba/rroonga/commit/5058deeecae407cb193b75e4e49aef854017347a

  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-02 18:00:54 +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 



More information about the Groonga-commit mailing list
Back to archive index