Kouhei Sutou
null+****@clear*****
Tue Dec 30 15:51:41 JST 2014
Kouhei Sutou 2014-12-30 15:51:41 +0900 (Tue, 30 Dec 2014) New Revision: 14704292966415573a235b8b361807b22dafc97c https://github.com/ranguba/rroonga/commit/14704292966415573a235b8b361807b22dafc97c Message: test: assert related values at once Modified files: test/test-column.rb Modified: test/test-column.rb (+9 -8) =================================================================== --- test/test-column.rb 2014-12-30 15:48:31 +0900 (80f5cf4) +++ test/test-column.rb 2014-12-30 15:51:41 +0900 (c997550) @@ -523,18 +523,19 @@ class ColumnTest < Test::Unit::TestCase def test_truncate posts = Groonga::Hash.create(:name => "Posts", :key_type => "ShortText") posts.define_column("body", "Text") + body1 = "body1" body2 = "body2" - post1 = posts.add("title1", :body => body1) - post2 = posts.add("title2", :body => body2) - - assert_equal(body1, post1["body"]) - assert_equal(body2, post2["body"]) + records = [ + posts.add("title1", :body => body1), + posts.add("title2", :body => body2), + ] + assert_equal([body1, body2], + records.collect(&:body)) posts.column("body").truncate - - assert_nil(post1["body"]) - assert_nil(post2["body"]) + assert_equal([nil, nil], + records.collect(&:body)) end end end -------------- next part -------------- HTML����������������������������...Download