[Groonga-commit] droonga/fluent-plugin-droonga at e48c44b [master] Test: receive all messages given to emit

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 20 16:04:46 JST 2013


YUKI Hiroshi	2013-11-20 16:04:46 +0900 (Wed, 20 Nov 2013)

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

  Message:
    Test: receive all messages given to emit

  Modified files:
    test/helper/handler_helper.rb
    test/plugin/handler/groonga/test_column_create.rb
    test/plugin/handler/groonga/test_table_create.rb

  Modified: test/helper/handler_helper.rb (+1 -1)
===================================================================
--- test/helper/handler_helper.rb    2013-11-20 16:11:46 +0900 (e129551)
+++ test/helper/handler_helper.rb    2013-11-20 16:04:46 +0900 (8c6e6f1)
@@ -19,7 +19,7 @@ module HandlerHelper
     @handler = handler_class.new(@worker)
 
     @messages = []
-    stub(@handler).emit do |message|
+    stub(@handler).emit do |*message|
       @messages << message
     end
   end

  Modified: test/plugin/handler/groonga/test_column_create.rb (+1 -1)
===================================================================
--- test/plugin/handler/groonga/test_column_create.rb    2013-11-20 16:11:46 +0900 (49f0477)
+++ test/plugin/handler/groonga/test_column_create.rb    2013-11-20 16:04:46 +0900 (905e3fe)
@@ -17,7 +17,7 @@ class ColumnCreateTest < GroongaHandlerTest
   def test_success
     @handler.table_create({"name" => "Books"})
     @handler.column_create({"table" => "Books", "name" => "title", "type" => "ShortText"})
-    assert_equal([true], @messages.last)
+    assert_equal([true], @messages.last.first)
   end
 
   def test_name

  Modified: test/plugin/handler/groonga/test_table_create.rb (+2 -2)
===================================================================
--- test/plugin/handler/groonga/test_table_create.rb    2013-11-20 16:11:46 +0900 (fe820f4)
+++ test/plugin/handler/groonga/test_table_create.rb    2013-11-20 16:04:46 +0900 (2afe354)
@@ -16,7 +16,7 @@
 class TableCreateTest < GroongaHandlerTest
   def test_success
     @handler.table_create({"name" => "Books"})
-    response =****@messa*****
+    response =****@messa*****
     assert_equal(
       [[Droonga::GroongaHandler::Status::SUCCESS, NORMALIZED_START_TIME, NORMALIZED_ELAPSED_TIME], true],
       [normalize_header(response.first), response.last]
@@ -25,7 +25,7 @@ class TableCreateTest < GroongaHandlerTest
 
   def test_failure
     @handler.table_create({})
-    response =****@messa*****
+    response =****@messa*****
     assert_equal(
       [[Droonga::GroongaHandler::Status::INVALID_ARGUMENT, NORMALIZED_START_TIME, NORMALIZED_ELAPSED_TIME], false],
       [normalize_header(response.first), response.last]
-------------- next part --------------
HTML����������������������������...
Download 



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