Kosuke Asami
null+****@clear*****
Mon Jul 22 14:51:53 JST 2013
Kosuke Asami 2013-07-22 14:51:53 +0900 (Mon, 22 Jul 2013) New Revision: 948732ee242073beea31264c9994e03fc3bb0c33 https://github.com/groonga/fluent-plugin-droonga/commit/948732ee242073beea31264c9994e03fc3bb0c33 Message: test column_create: extract common codes that define schema as a setup method Modified files: test/plugin/groonga/test_column_create.rb Modified: test/plugin/groonga/test_column_create.rb (+6 -4) =================================================================== --- test/plugin/groonga/test_column_create.rb 2013-07-22 14:48:36 +0900 (01c62d5) +++ test/plugin/groonga/test_column_create.rb 2013-07-22 14:51:53 +0900 (f89d4f4) @@ -68,6 +68,12 @@ column_create Books title COLUMN_VECTOR ShortText end class IndexTest < self + def setup + super + @handler.table_create({"name" => "Books"}) + @handler.column_create({"table" => "Books", "name" => "title", "type" => "ShortText"}) + end + def test_index_column_type data = { :flags => "COLUMN_INDEX", @@ -82,8 +88,6 @@ column_create Books entry_title COLUMN_INDEX Books title "source" => "title", "flags" => data[:flags], } - @handler.table_create({"name" => "Books"}) - @handler.column_create({"table" => "Books", "name" => "title", "type" => "ShortText"}) @handler.column_create(request) assert_equal("table_create Books TABLE_HASH_KEY --key_type ShortText\ncolumn_create Books title COLUMN_SCALAR ShortText\n\n#{data[:schema]}", dump) end @@ -122,8 +126,6 @@ column_create Books entry_title COLUMN_INDEX|WITH_SECTION|WITH_WEIGHT|WITH_POSIT "source" => "title", "flags" => data[:flags], } - @handler.table_create({"name" => "Books"}) - @handler.column_create({"table" => "Books", "name" => "title", "type" => "ShortText"}) @handler.column_create(request) assert_equal("table_create Books TABLE_HASH_KEY --key_type ShortText\ncolumn_create Books title COLUMN_SCALAR ShortText\n\n#{data[:schema]}", dump) end -------------- next part -------------- HTML����������������������������...Download