YUKI Hiroshi
null+****@clear*****
Wed Nov 20 14:27:47 JST 2013
YUKI Hiroshi 2013-11-20 14:27:47 +0900 (Wed, 20 Nov 2013) New Revision: 2f1bfbd96b0a2acd584a9e79e671eb3db805d051 https://github.com/droonga/fluent-plugin-droonga/commit/2f1bfbd96b0a2acd584a9e79e671eb3db805d051 Message: Test: setup stub emit in the setup process Modified files: test/plugin/handler/groonga/test_table_create.rb test/plugin/handler/test_handler_groonga.rb Modified: test/plugin/handler/groonga/test_table_create.rb (+0 -8) =================================================================== --- test/plugin/handler/groonga/test_table_create.rb 2013-11-20 14:25:18 +0900 (12f1473) +++ test/plugin/handler/groonga/test_table_create.rb 2013-11-20 14:27:47 +0900 (7e64c7e) @@ -15,7 +15,6 @@ class TableCreateTest < GroongaHandlerTest def test_success - setup_stub_emit(@handler) @handler.table_create({"name" => "Books"}) assert_equal( [[Droonga::GroongaHandler::Status::SUCCESS, NORMALIZED_START_TIME, NORMALIZED_ELAPSED_TIME], true], @@ -24,7 +23,6 @@ class TableCreateTest < GroongaHandlerTest end def test_failure - setup_stub_emit(@handler) @handler.table_create({}) assert_equal( [[Droonga::GroongaHandler::Status::INVALID_ARGUMENT, NORMALIZED_START_TIME, NORMALIZED_ELAPSED_TIME], false], @@ -33,7 +31,6 @@ class TableCreateTest < GroongaHandlerTest end def test_name - setup_stub_emit(@handler) @handler.table_create({"name" => "Books"}) assert_equal(<<-SCHEMA, dump) table_create Books TABLE_HASH_KEY --key_type ShortText @@ -84,7 +81,6 @@ table_create Books TABLE_NO_KEY "name" => "Books", "flags" => data[:flags], } - setup_stub_emit(@handler) @handler.table_create(request) assert_equal(data[:schema], dump) end @@ -96,7 +92,6 @@ table_create Books TABLE_NO_KEY "name" => "Books", "key_type" => "Int32", } - setup_stub_emit(@handler) @handler.table_create(request) assert_equal(<<-SCHEMA, dump) table_create Books TABLE_HASH_KEY --key_type Int32 @@ -110,7 +105,6 @@ table_create Books TABLE_HASH_KEY --key_type Int32 "name" => "Books", "value_type" => "Int32", } - setup_stub_emit(@handler) @handler.table_create(request) assert_equal(<<-SCHEMA, dump) table_create Books TABLE_HASH_KEY --key_type ShortText --value_type Int32 @@ -124,7 +118,6 @@ table_create Books TABLE_HASH_KEY --key_type ShortText --value_type Int32 "name" => "Books", "default_tokenizer" => "TokenBigram", } - setup_stub_emit(@handler) @handler.table_create(request) assert_equal(<<-SCHEMA, dump) table_create Books TABLE_HASH_KEY --key_type ShortText --default_tokenizer TokenBigram @@ -138,7 +131,6 @@ table_create Books TABLE_HASH_KEY --key_type ShortText --default_tokenizer Token "name" => "Books", "normalizer" => "NormalizerAuto", } - setup_stub_emit(@handler) @handler.table_create(request) assert_equal(<<-SCHEMA, dump) table_create Books TABLE_HASH_KEY|KEY_NORMALIZE --key_type ShortText Modified: test/plugin/handler/test_handler_groonga.rb (+1 -0) =================================================================== --- test/plugin/handler/test_handler_groonga.rb 2013-11-20 14:25:18 +0900 (aef9aa8) +++ test/plugin/handler/test_handler_groonga.rb 2013-11-20 14:27:47 +0900 (ba92a19) @@ -32,6 +32,7 @@ class GroongaHandlerTest < Test::Unit::TestCase def setup_handler @worker = StubWorker.new @handler = Droonga::GroongaHandler.new(@worker) + setup_stub_emit(@handler) end def teardown_handler -------------- next part -------------- HTML����������������������������...Download