[Groonga-commit] droonga/droonga-engine at f91105d [master] Add StubSerf for unit testing

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 30 16:09:53 JST 2015


YUKI Hiroshi	2015-04-30 16:09:53 +0900 (Thu, 30 Apr 2015)

  New Revision: f91105df90b9b150445c1d088543c770866cc864
  https://github.com/droonga/droonga-engine/commit/f91105df90b9b150445c1d088543c770866cc864

  Message:
    Add StubSerf for unit testing

  Copied files:
    test/unit/helper/stub_serf.rb
      (from test/unit/helper.rb)
  Modified files:
    test/unit/helper.rb

  Modified: test/unit/helper.rb (+2 -1)
===================================================================
--- test/unit/helper.rb    2015-04-30 15:53:11 +0900 (f7997ec)
+++ test/unit/helper.rb    2015-04-30 16:09:53 +0900 (c7919a8)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014 Droonga Project
+# Copyright (C) 2013-2015 Droonga Project
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -21,6 +21,7 @@ require_relative "helper/stub_worker"
 require_relative "helper/plugin_helper"
 require_relative "helper/watch_helper"
 require_relative "helper/distributed_search_planner_helper"
+require_relative "helper/stub_serf"
 
 class Test::Unit::TestCase
   include ::Sandbox

  Copied: test/unit/helper/stub_serf.rb (+11 -11) 64%
===================================================================
--- test/unit/helper.rb    2015-04-30 15:53:11 +0900 (f7997ec)
+++ test/unit/helper/stub_serf.rb    2015-04-30 16:09:53 +0900 (d0fed99)
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2014 Droonga Project
+# Copyright (C) 2015 Droonga Project
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -13,16 +13,16 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-require "droonga/test"
+class StubSerf
+  def initialize
+    @have_unprocessed_messages_for = {}
+  end
 
-require_relative "helper/sandbox"
-require_relative "helper/fixture"
-require_relative "helper/stub_worker"
-require_relative "helper/plugin_helper"
-require_relative "helper/watch_helper"
-require_relative "helper/distributed_search_planner_helper"
+  def set_have_unprocessed_messages_for(target)
+    @have_unprocessed_messages_for[target] = true
+  end
 
-class Test::Unit::TestCase
-  include ::Sandbox
-  include ::Fixture
+  def reset_have_unprocessed_messages_for(target)
+    @have_unprocessed_messages_for.delete(target)
+  end
 end
-------------- next part --------------
HTML����������������������������...
Descargar 



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