[Groonga-commit] droonga/fluent-plugin-droonga at 617c90f [master] Rewrite test for plugin based on a legay one

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 27 20:29:48 JST 2013


YUKI Hiroshi	2013-11-27 20:29:48 +0900 (Wed, 27 Nov 2013)

  New Revision: 617c90f27b5da9adf0e06b962a5c4762b32ab0f8
  https://github.com/droonga/fluent-plugin-droonga/commit/617c90f27b5da9adf0e06b962a5c4762b32ab0f8

  Message:
    Rewrite test for plugin based on a legay one

  Renamed files:
    test/unit/test_plugin.rb
      (from test/unit/test_handler.rb)

  Renamed: test/unit/test_plugin.rb (+7 -15) 66%
===================================================================
--- test/unit/test_handler.rb    2013-11-27 20:25:17 +0900 (c024ea6)
+++ test/unit/test_plugin.rb    2013-11-27 20:29:48 +0900 (a57f3f9)
@@ -13,25 +13,17 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-# TODO: Rename to test_plugin
-require "droonga/legacy_plugin"
+require "droonga/plugin"
 
-class HandlerTest < Test::Unit::TestCase
-  class HandlableTest < self
-    class SearchHandler < Droonga::LegacyPlugin
+class PluginTest < Test::Unit::TestCase
+  class PluggableTest < self
+    class SearchPlugin < Droonga::Plugin
       command :search
       def search(request)
         :search_response
       end
     end
 
-    class StatusHandler < Droonga::LegacyPlugin
-      command :status
-      def status(request)
-        :status_response
-      end
-    end
-
     class Worker
       def context
         nil
@@ -40,15 +32,15 @@ class HandlerTest < Test::Unit::TestCase
 
     def setup
       context = Worker.new
-      @search_handler = SearchHandler.new(context)
+      @search_plugin = SearchPlugin.new(context)
     end
 
     def test_true
-      assert_true(@search_handler.handlable?(:search))
+      assert_true(@search_plugin.processable?(:search))
     end
 
     def test_false
-      assert_false(@search_handler.handlable?(:status))
+      assert_false(@search_plugin.processable?(:status))
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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