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

ruby-changes:29185

From: kou <ko1@a...>
Date: Wed, 12 Jun 2013 00:09:19 +0900 (JST)
Subject: [ruby-changes:29185] kou:r41236 (trunk): * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.

kou	2013-06-12 00:08:59 +0900 (Wed, 12 Jun 2013)

  New Revision: 41236

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41236

  Log:
    * lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
    * test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
      Add a test for the extracted method.

  Modified files:
    trunk/ChangeLog
    trunk/test/xmlrpc/test_client.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41235)
+++ ChangeLog	(revision 41236)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 12 00:07:46 2013  Kouhei Sutou  <kou@c...>
+
+	* lib/xmlrpc/client.rb (XMLRPC::Client#parse_set_cookies): Extract.
+	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest#test_cookie_simple):
+	  Add a test for the extracted method.
+
 Tue Jun 11 23:56:24 2013  Kouhei Sutou  <kou@c...>
 
 	* test/xmlrpc/test_client.rb (XMLRPC::ClientTest::Fake::HTTP#started):
Index: test/xmlrpc/test_client.rb
===================================================================
--- test/xmlrpc/test_client.rb	(revision 41235)
+++ test/xmlrpc/test_client.rb	(revision 41236)
@@ -280,6 +280,13 @@ module XMLRPC https://github.com/ruby/ruby/blob/trunk/test/xmlrpc/test_client.rb#L280
       assert_equal 1, resp.first['blogid']
     end
 
+    def test_cookie_simple
+      client = Fake::Client.new2('http://example.org/cookie')
+      assert_nil(client.cookie)
+      client.send(:parse_set_cookies, ["param1=value1", "param2=value2"])
+      assert_equal("param1=value1; param2=value2", client.cookie)
+    end
+
     private
     def read filename
       File.read File.expand_path(File.join(__FILE__, '..', 'data', filename))

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

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