[前][次][番号順一覧][スレッド一覧]

ruby-changes:42831

From: ktsj <ko1@a...>
Date: Wed, 4 May 2016 17:50:07 +0900 (JST)
Subject: [ruby-changes:42831] ktsj:r54905 (trunk): * test/net/http/test_httpheader.rb: add missing test of

ktsj	2016-05-04 18:46:43 +0900 (Wed, 04 May 2016)

  New Revision: 54905

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54905

  Log:
    * test/net/http/test_httpheader.rb: add missing test of
      Net::HTTPHeader#each_capitalized_name.

  Modified files:
    trunk/test/net/http/test_httpheader.rb
Index: test/net/http/test_httpheader.rb
===================================================================
--- test/net/http/test_httpheader.rb	(revision 54904)
+++ test/net/http/test_httpheader.rb	(revision 54905)
@@ -121,6 +121,15 @@ class HTTPHeaderTest < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/net/http/test_httpheader.rb#L121
     @c.each_key do |k|
       assert_equal 'my-header', k
     end
+
+  def test_each_capitalized_name
+    @c['my-header'] = 'test'
+    @c.each_capitalized_name do |k|
+      assert_equal 'My-Header', k
+    end
+    @c.each_capitalized_name do |k|
+      assert_equal 'My-Header', k
+    end
   end
 
   def test_each_value

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]