1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_io_console.rb: descriptive assertions

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-03 07:54:24 +00:00
parent f050b22327
commit b381a662fe
2 changed files with 13 additions and 4 deletions

View file

@ -1,4 +1,7 @@
Sun Feb 3 16:54:15 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sun Feb 3 16:54:22 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.

View file

@ -271,8 +271,14 @@ end if defined?(IO.console)
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