[Groonga-commit] ranguba/chupa-text at 617b300 [master] Fix test case to work with text/plain isn't processed change

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jan 5 15:05:10 JST 2014


Kouhei Sutou	2014-01-05 15:05:10 +0900 (Sun, 05 Jan 2014)

  New Revision: 617b3005c85c49306ae4aa5e1575cf9b1be31c2b
  https://github.com/ranguba/chupa-text/commit/617b3005c85c49306ae4aa5e1575cf9b1be31c2b

  Message:
    Fix test case to work with text/plain isn't processed change

  Modified files:
    test/test-extractor.rb

  Modified: test/test-extractor.rb (+3 -3)
===================================================================
--- test/test-extractor.rb    2014-01-05 15:03:12 +0900 (c46311f)
+++ test/test-extractor.rb    2014-01-05 15:05:10 +0900 (02c81fb)
@@ -97,12 +97,12 @@ class TestExtractor < Test::Unit::TestCase
     sub_test_case("multi decomposed") do
       class CopyDecomposer < ChupaText::Decomposer
         def target?(data)
-          data["copied"].nil?
+          data.mime_type == "text/x-plain"
         end
 
         def decompose(data)
           copied_data = data.dup
-          copied_data["copied"] = true
+          copied_data.mime_type = "text/plain"
           yield(copied_data.dup)
           yield(copied_data.dup)
         end
@@ -116,7 +116,7 @@ class TestExtractor < Test::Unit::TestCase
 
       def test_decompose
         data = ChupaText::Data.new
-        data.mime_type = "text/plain"
+        data.mime_type = "text/x-plain"
         data.body = "Hello"
         assert_equal(["Hello", "Hello"], extract(data))
       end
-------------- next part --------------
HTML����������������������������...
Download 



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