summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-30 04:33:28 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-30 04:33:28 +0000
commitbcb5c27fc44375cde4d045f06254c58aa929e883 (patch)
tree871f63d270a0a6aa7c9f5fc6380ca15fe484419f /test/ruby/test_io.rb
parent246102b536ddd46f33162c81fa7d3e639128efbe (diff)
* test/ruby/test_class.rb: Simplify warning checks
* test/ruby/test_io.rb: ditto * test/ruby/test_module.rb: ditto * test/ruby/test_regexp.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c19b1608df..8ccb5de03b 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -2396,20 +2396,17 @@ End
end
def test_warn
- stderr = EnvUtil.verbose_warning do
+ assert_warning "warning\n" do
warn "warning"
end
- assert_equal("warning\n", stderr)
- stderr = EnvUtil.verbose_warning do
+ assert_warning '' do
warn
end
- assert_equal("", stderr)
- stderr = EnvUtil.verbose_warning do
+ assert_warning "[Feature #5029]\n[ruby-core:38070]\n" do
warn "[Feature #5029]", "[ruby-core:38070]"
end
- assert_equal("[Feature #5029]\n[ruby-core:38070]\n", stderr)
end
def test_cloexec