[Groonga-commit] droonga/fluent-plugin-droonga at ca2deb0 [master] Use DatabaseHelper

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 20 12:36:32 JST 2013


YUKI Hiroshi	2013-11-20 12:36:32 +0900 (Wed, 20 Nov 2013)

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

  Message:
    Use DatabaseHelper

  Modified files:
    test/plugin/handler/test_handler_add.rb

  Modified: test/plugin/handler/test_handler_add.rb (+2 -12)
===================================================================
--- test/plugin/handler/test_handler_add.rb    2013-11-20 12:31:50 +0900 (1a7deff)
+++ test/plugin/handler/test_handler_add.rb    2013-11-20 12:36:32 +0900 (d048ec5)
@@ -16,6 +16,8 @@
 require "droonga/plugin/handler_add"
 
 class AddHandlerTest < Test::Unit::TestCase
+  include DatabaseHelper
+
   def setup
     setup_database
     setup_schema
@@ -28,21 +30,9 @@ class AddHandlerTest < Test::Unit::TestCase
   end
 
   private
-  def setup_database
-    FileUtils.rm_rf(@database_path.dirname.to_s)
-    FileUtils.mkdir_p(@database_path.dirname.to_s)
-    @database = Groonga::Database.create(:path => @database_path.to_s)
-  end
-
   def setup_schema
   end
 
-  def teardown_database
-    @database.close
-    @database = nil
-    FileUtils.rm_rf(@database_path.dirname.to_s)
-  end
-
   def setup_handler
     @worker = StubWorker.new
     @handler = Droonga::AddHandler.new(@worker)
-------------- next part --------------
HTML����������������������������...
Download 



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