[Groonga-commit] droonga/fluent-plugin-droonga at fc44d51 [master] Extract DatabaseHelper form WatchHelper

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 20 12:31:50 JST 2013


YUKI Hiroshi	2013-11-20 12:31:50 +0900 (Wed, 20 Nov 2013)

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

  Message:
    Extract DatabaseHelper form WatchHelper

  Copied files:
    test/helper/database_helper.rb
      (from test/helper/watch_helper.rb)
  Modified files:
    test/helper.rb
    test/helper/watch_helper.rb

  Modified: test/helper.rb (+1 -0)
===================================================================
--- test/helper.rb    2013-11-19 13:25:19 +0900 (acb1c6e)
+++ test/helper.rb    2013-11-20 12:31:50 +0900 (0feaea2)
@@ -16,6 +16,7 @@
 require_relative "helper/sandbox"
 require_relative "helper/fixture"
 require_relative "helper/stub_worker"
+require_relative "helper/database_helper"
 require_relative "helper/watch_helper"
 
 class Test::Unit::TestCase

  Copied: test/helper/database_helper.rb (+1 -8) 85%
===================================================================
--- test/helper/watch_helper.rb    2013-11-19 13:25:19 +0900 (b018750)
+++ test/helper/database_helper.rb    2013-11-20 12:31:50 +0900 (f1d1531)
@@ -13,20 +13,13 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-require "droonga/watch_schema"
-
-module WatchHelper
+module DatabaseHelper
   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
-    schema = Droonga::WatchSchema.new(Groonga::Context.default)
-    schema.ensure_created
-  end
-
   def teardown_database
     @database.close
     @database = nil

  Modified: test/helper/watch_helper.rb (+1 -10)
===================================================================
--- test/helper/watch_helper.rb    2013-11-19 13:25:19 +0900 (b018750)
+++ test/helper/watch_helper.rb    2013-11-20 12:31:50 +0900 (8421d5d)
@@ -16,16 +16,7 @@
 require "droonga/watch_schema"
 
 module WatchHelper
-  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
-    schema = Droonga::WatchSchema.new(Groonga::Context.default)
-    schema.ensure_created
-  end
+  include DatabaseHelper
 
   def teardown_database
     @database.close
-------------- next part --------------
HTML����������������������������...
Download 



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