[Groonga-commit] droonga/fluent-plugin-droonga at 6135fe8 [master] test catalog: group partition test

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 30 18:00:23 JST 2014


Kouhei Sutou	2014-01-30 18:00:23 +0900 (Thu, 30 Jan 2014)

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

  Message:
    test catalog: group partition test

  Modified files:
    test/unit/catalog/test_version1.rb

  Modified: test/unit/catalog/test_version1.rb (+7 -17)
===================================================================
--- test/unit/catalog/test_version1.rb    2014-01-30 17:59:16 +0900 (092fda1)
+++ test/unit/catalog/test_version1.rb    2014-01-30 18:00:23 +0900 (c2d31b0)
@@ -16,16 +16,18 @@
 require "droonga/catalog/version1"
 
 class CatalogTest < Test::Unit::TestCase
+  private
   def minimum_data
     {
       "datasets" => [],
     }
   end
 
-  class OptionTest < self
-    def setup
-    end
+  def create_catalog(data, base_path)
+    Droonga::Catalog::Version1.new(data, base_path)
+  end
 
+  class OptionTest < self
     def create_catalog(options)
       super(minimum_data.merge("options" => options), "base-path")
     end
@@ -42,6 +44,7 @@ class CatalogTest < Test::Unit::TestCase
     end
   end
 
+  class PartitionTest < self
   def setup
     data = JSON.parse(File.read(catalog_path))
     @catalog = create_catalog(data, base_path)
@@ -74,11 +77,6 @@ class CatalogTest < Test::Unit::TestCase
                  partitions)
   end
 
-  private
-  def create_catalog(data, base_path)
-    Droonga::Catalog::Version1.new(data, base_path)
-  end
-
   def fixture_path(base_path)
     File.expand_path("../../fixtures/#{base_path}", __FILE__)
   end
@@ -90,13 +88,11 @@ class CatalogTest < Test::Unit::TestCase
   def base_path
     File.dirname(catalog_path)
   end
+  end
 
   class DataSetTest < self
     class RingTest < self
       class TotalWeightTest < self
-        def setup
-        end
-
         def test_three_zones
           dataset = {
             "ring" => {
@@ -125,9 +121,6 @@ class CatalogTest < Test::Unit::TestCase
   end
 
   class InputAdapterOptionsTest < self
-    def setup
-    end
-
     def options(data)
       catalog = create_catalog(minimum_data.merge(data), "base-path")
       catalog.input_adapter_options
@@ -175,9 +168,6 @@ class CatalogTest < Test::Unit::TestCase
   end
 
   class OutputAdapterOptionsTest < self
-    def setup
-    end
-
     def options(data)
       catalog = create_catalog(minimum_data.merge(data), "base-path")
       catalog.output_adapter_options
-------------- next part --------------
HTML����������������������������...
Download 



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