[Groonga-commit] droonga/fluent-plugin-droonga at 58511e8 [master] test: share common code

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 14 17:16:10 JST 2014


Kouhei Sutou	2014-03-14 17:16:10 +0900 (Fri, 14 Mar 2014)

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

  Message:
    test: share common code

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

  Modified: test/unit/catalog/test_schema.rb (+15 -11)
===================================================================
--- test/unit/catalog/test_schema.rb    2014-03-14 17:14:12 +0900 (11188eb)
+++ test/unit/catalog/test_schema.rb    2014-03-14 17:16:10 +0900 (4f7380d)
@@ -229,23 +229,27 @@ class CatalogSchemaTest < Test::Unit::TestCase
       end
 
       class FlagsTest < self
+        def flags(data)
+          create_column("column_name", data).flags
+        end
+
         def test_type
+          data = {
+            "type" => "Scalar"
+          }
           assert_equal(["COLUMN_SCALAR"],
-                       create_column("column_name",
-                                     {
-                                       "type" => "Scalar"
-                                     }).flags)
+                       flags(data))
         end
 
         def test_type_and_index_options
+          data = {
+            "type" => "Scalar",
+            "indexOptions" => {
+              "section" => true
+            }
+          }
           assert_equal(["COLUMN_SCALAR", "WITH_SECTION"],
-                       create_column("column_name",
-                                     {
-                                       "type" => "Scalar",
-                                       "indexOptions" => {
-                                         "section" => true
-                                       }
-                                     }).flags)
+                       flags(data))
         end
       end
     end
-------------- next part --------------
HTML����������������������������...
Télécharger 



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