Kouhei Sutou
null+****@clear*****
Fri Feb 3 21:46:53 JST 2017
Kouhei Sutou 2017-02-03 21:46:53 +0900 (Fri, 03 Feb 2017) New Revision: fb5378de2b3d808b149cc9e9c5f9f2d6c626c576 https://github.com/ranguba/groonga-client-model/commit/fb5378de2b3d808b149cc9e9c5f9f2d6c626c576 Message: test: use real column object Modified files: test/unit/test_record.rb Modified: test/unit/test_record.rb (+20 -5) =================================================================== --- test/unit/test_record.rb 2017-02-03 21:46:46 +0900 (e036d63) +++ test/unit/test_record.rb 2017-02-03 21:46:53 +0900 (eac8ea6) @@ -15,11 +15,16 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA class TestRecord < Test::Unit::TestCase + Column = Groonga::Client::Response::Schema::Column + sub_test_case("ActiveModel") do class EmptyModel < GroongaClientModel::Record class << self def columns - GroongaClientModel::Schema::Columns.new(nil, "_id" => {}) + raw_columns = { + "_id" => Column.new(nil, {}), + } + GroongaClientModel::Schema::Columns.new(nil, raw_columns) end end end @@ -55,7 +60,10 @@ class TestRecord < Test::Unit::TestCase class NoKey < GroongaClientModel::Record class << self def columns - GroongaClientModel::Schema::Columns.new(nil, "_id" => {}) + raw_columns = { + "_id" => Column.new(nil, {}), + } + GroongaClientModel::Schema::Columns.new(nil, raw_columns) end end end @@ -63,9 +71,16 @@ class TestRecord < Test::Unit::TestCase class HaveKey < GroongaClientModel::Record class << self def columns - GroongaClientModel::Schema::Columns.new(nil, - "_id" => {}, - "_key" => {}) + raw_columns = { + "_id" => Column.new(nil, {}), + "_key" => Column.new(nil, { + "name" => "_key", + "value_type" => { + "name" => "ShortText", + }, + }), + } + GroongaClientModel::Schema::Columns.new(nil, raw_columns) end end end -------------- next part -------------- HTML����������������������������...Download