[Groonga-commit] ranguba/rroonga at 4c271ef [master] test: use Power Assert

Back to archive index

cosmo0920 null+****@clear*****
Mon Sep 29 23:41:38 JST 2014


cosmo0920	2014-09-29 23:41:38 +0900 (Mon, 29 Sep 2014)

  New Revision: 4c271efbb68ec9a594b1f35df6c9e753048ef25d
  https://github.com/ranguba/rroonga/commit/4c271efbb68ec9a594b1f35df6c9e753048ef25d

  Message:
    test: use Power Assert
    
    Rewrite assert_send and assert_not_send to Power Assert assertion!

  Modified files:
    test/test-database.rb
    test/test-variable-size-column.rb

  Modified: test/test-database.rb (+6 -2)
===================================================================
--- test/test-database.rb    2014-09-29 22:55:59 +0900 (ea6d631)
+++ test/test-database.rb    2014-09-29 23:41:38 +0900 (2d0493d)
@@ -90,13 +90,17 @@ class DatabaseTest < Test::Unit::TestCase
   def test_each
     setup_database
     default_object_names =****@datab***** {|object| object.name}.sort
-    assert_send([default_object_names, :include?, "Bool"])
+    assert do
+      default_object_names.include?("Bool")
+    end
   end
 
   def test_each_without_block
     setup_database
     default_object_names =****@datab***** {|object| object.name}.sort
-    assert_send([default_object_names, :include?, "Bool"])
+    assert do
+      default_object_names.include?("Bool")
+    end
   end
 
   def test_encoding

  Modified: test/test-variable-size-column.rb (+4 -4)
===================================================================
--- test/test-variable-size-column.rb    2014-09-29 22:55:59 +0900 (43856a2)
+++ test/test-variable-size-column.rb    2014-09-29 23:41:38 +0900 (bd06896)
@@ -79,9 +79,9 @@ class VariableSizeColumnTest < Test::Unit::TestCase
     description =****@users*****_column("description", "ShortText",
                                        :compress => :zlib)
     if context.support_zlib?
-      assert_send([description, :compressed?, :zlib])
+      assert { description.compressed?(:zlib) }
     else
-      assert_not_send([description, :compressed?, :zlib])
+      assert { not description.compressed?(:zlib) }
     end
   end
 
@@ -89,9 +89,9 @@ class VariableSizeColumnTest < Test::Unit::TestCase
     description =****@users*****_column("description", "ShortText",
                                        :compress => :lzo)
     if context.support_lzo?
-      assert_send([description, :compressed?, :lzo])
+      assert { description.compressed?(:lzo) }
     else
-      assert_not_send([description, :compressed?, :lzo])
+      assert { not description.compressed?(:lzo) }
     end
   end
 
-------------- next part --------------
HTML����������������������������...
下載 



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