[Groonga-commit] droonga/fluent-plugin-droonga at 25d9e99 [master] test: extract input data into setup

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 30 14:27:34 JST 2014


Kouhei Sutou	2014-01-30 14:27:34 +0900 (Thu, 30 Jan 2014)

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

  Message:
    test: extract input data into setup

  Modified files:
    test/unit/plugin/distributor/test_search_planner.rb

  Modified: test/unit/plugin/distributor/test_search_planner.rb (+5 -3)
===================================================================
--- test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 14:24:36 +0900 (d3d2007)
+++ test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 14:27:34 +0900 (947d945)
@@ -23,8 +23,8 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
   end
 
   class MultipleQueriesTest < self
-    def test_distribute
-      request = {
+    def setup
+      @request = {
         "type" => "search",
         "dataset" => "Droonga",
         "body" => {
@@ -62,7 +62,9 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
           },
         },
       }
+    end
 
+    def test_distribute
       expected_plan = []
 
       expected_plan << {
@@ -226,7 +228,7 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
       }
       expected_plan << searcher
 
-      assert_equal(expected_plan, plan(request))
+      assert_equal(expected_plan, plan(@request))
     end
   end
 
-------------- next part --------------
HTML����������������������������...
Descargar 



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