[Groonga-commit] droonga/fluent-plugin-droonga at 725dee8 [master] test: simplify

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Feb 14 12:52:24 JST 2014


Kouhei Sutou	2014-02-14 12:52:24 +0900 (Fri, 14 Feb 2014)

  New Revision: 725dee8ba2f4da5358209a1494267ed10b62dd8b
  https://github.com/droonga/fluent-plugin-droonga/commit/725dee8ba2f4da5358209a1494267ed10b62dd8b

  Message:
    test: simplify
    
    I found tests for catalog validations. Sorry.

  Modified files:
    test/unit/catalog/test_version1.rb

  Modified: test/unit/catalog/test_version1.rb (+1 -10)
===================================================================
--- test/unit/catalog/test_version1.rb    2014-02-14 12:50:40 +0900 (2f9d0dc)
+++ test/unit/catalog/test_version1.rb    2014-02-14 12:52:24 +0900 (b34e694)
@@ -366,17 +366,8 @@ class CatalogTest < Test::Unit::TestCase
       },
     )
     def test_validation(data)
-      begin
+      assert_raise(Droonga::MultiplexError.new(data[:errors])) do
         create_catalog(data[:catalog], "path/to/catalog")
-        assert_nil("must not reach here")
-      rescue Droonga::MultiplexError => actual_errors
-        actual_errors = actual_errors.errors.collect do |error|
-          error.message
-        end.sort
-        expected_errors = data[:errors].collect do |error|
-          error.message
-        end.sort
-        assert_equal(expected_errors, actual_errors)
       end
     end
   end
-------------- next part --------------
HTML����������������������������...
Download 



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