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

ruby-changes:26978

From: nobu <ko1@a...>
Date: Sun, 3 Feb 2013 16:54:34 +0900 (JST)
Subject: [ruby-changes:26978] nobu:r39030 (trunk): test_io_console.rb: descriptive assertions

nobu	2013-02-03 16:54:24 +0900 (Sun, 03 Feb 2013)

  New Revision: 39030

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

  Log:
    test_io_console.rb: descriptive assertions
    
    * test/io/console/test_io_console.rb (test_stringio_getch): use more
      descriptive assertions.

  Modified files:
    trunk/ChangeLog
    trunk/test/io/console/test_io_console.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39029)
+++ ChangeLog	(revision 39030)
@@ -1,4 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Sun Feb  3 16:54:15 2013  Nobuyoshi Nakada  <nobu@r...>
+Sun Feb  3 16:54:22 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* test/io/console/test_io_console.rb (test_stringio_getch): use more
+	  descriptive assertions.
 
 	* ext/io/console/console.c (rawmode_opt): min is minimum characters,
 	  not tenths.
Index: test/io/console/test_io_console.rb
===================================================================
--- test/io/console/test_io_console.rb	(revision 39029)
+++ test/io/console/test_io_console.rb	(revision 39030)
@@ -271,8 +271,14 @@ end if defined?(IO.console) https://github.com/ruby/ruby/blob/trunk/test/io/console/test_io_console.rb#L271
 
 class TestIO_Console < Test::Unit::TestCase
   def test_stringio_getch
-    assert_ruby_status(%w"--disable=gems -rstringio -rio/console", "exit(StringIO.method_defined?(:getch))")
-    assert_ruby_status(%w"--disable=gems -rio/console -rstringio", "exit(StringIO.method_defined?(:getch))")
-    assert_ruby_status(%w"--disable=gems -rstringio", "exit(!StringIO.method_defined?(:getch))")
+    assert_separately %w"--disable=gems -rstringio -rio/console", %q{
+      assert_operator(StringIO, :method_defined?, :getch)
+    }
+    assert_separately %w"--disable=gems -rio/console -rstringio", %q{
+      assert_operator(StringIO, :method_defined?, :getch)
+    }
+    assert_separately %w"--disable=gems -rstringio", %q{
+      assert_not_operator(StringIO, :method_defined?, :getch)
+    }
   end
 end

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

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