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

ruby-changes:49047

From: ko1 <ko1@a...>
Date: Tue, 12 Dec 2017 21:40:48 +0900 (JST)
Subject: [ruby-changes:49047] ko1:r61162 (trunk): ignore lines (to catch up r61155).

ko1	2017-12-12 21:40:41 +0900 (Tue, 12 Dec 2017)

  New Revision: 61162

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

  Log:
    ignore lines (to catch up r61155).
    
    * spec/ruby/library/net/ftp/return_code_spec.rb: check message body only.
    
    * spec/ruby/library/net/http/http/set_debug_output_spec.rb: ditto.

  Modified files:
    trunk/spec/ruby/library/net/ftp/return_code_spec.rb
    trunk/spec/ruby/library/net/http/http/set_debug_output_spec.rb
Index: spec/ruby/library/net/ftp/return_code_spec.rb
===================================================================
--- spec/ruby/library/net/ftp/return_code_spec.rb	(revision 61161)
+++ spec/ruby/library/net/ftp/return_code_spec.rb	(revision 61162)
@@ -9,7 +9,7 @@ describe "Net::FTP#return_code" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/net/ftp/return_code_spec.rb#L9
   it "outputs a warning and returns a newline" do
     lambda do
       @ftp.return_code.should == "\n"
-    end.should complain("warning: Net::FTP#return_code is obsolete and do nothing\n")
+    end.should complain(/warning: Net::FTP#return_code is obsolete and do nothing/)
   end
 end
 
@@ -19,6 +19,6 @@ describe "Net::FTP#return_code=" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/net/ftp/return_code_spec.rb#L19
   end
 
   it "outputs a warning" do
-    lambda { @ftp.return_code = 123 }.should complain("warning: Net::FTP#return_code= is obsolete and do nothing\n")
+    lambda { @ftp.return_code = 123 }.should complain(/warning: Net::FTP#return_code= is obsolete and do nothing/)
   end
 end
Index: spec/ruby/library/net/http/http/set_debug_output_spec.rb
===================================================================
--- spec/ruby/library/net/http/http/set_debug_output_spec.rb	(revision 61161)
+++ spec/ruby/library/net/http/http/set_debug_output_spec.rb	(revision 61162)
@@ -28,6 +28,6 @@ describe "Net::HTTP#set_debug_output whe https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/net/http/http/set_debug_output_spec.rb#L28
 
   it "outputs a warning when the connection has already been started" do
     @http.start
-    lambda { @http.set_debug_output(StringIO.new) }.should complain("Net::HTTP#set_debug_output called after HTTP started\n")
+    lambda { @http.set_debug_output(StringIO.new) }.should complain(/Net::HTTP#set_debug_output called after HTTP started/)
   end
 end

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

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