mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Imported minitest 4.3.2 (r8027)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
213ba52407
commit
2dc5e62545
2 changed files with 27 additions and 20 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Nov 30 06:56:30 2012 Ryan Davis <ryand-ruby@zenspider.com>
|
||||||
|
|
||||||
|
* test/minitest/*: Imported minitest 4.3.2 (r8027)
|
||||||
|
|
||||||
Fri Nov 30 04:16:29 2012 Eric Hodel <drbrain@segment7.net>
|
Fri Nov 30 04:16:29 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/rake/*: Updated to rake 0.9.5
|
* lib/rake/*: Updated to rake 0.9.5
|
||||||
|
|
|
@ -684,6 +684,15 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
"expected #{@assertion_count} assertions to be fired during the test, not #{@tc._assertions}") if @tc._assertions
|
"expected #{@assertion_count} assertions to be fired during the test, not #{@tc._assertions}") if @tc._assertions
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def non_verbose
|
||||||
|
orig_verbose = $VERBOSE
|
||||||
|
$VERBOSE = false
|
||||||
|
|
||||||
|
yield
|
||||||
|
ensure
|
||||||
|
$VERBOSE = orig_verbose
|
||||||
|
end
|
||||||
|
|
||||||
def test_assert
|
def test_assert
|
||||||
@assertion_count = 2
|
@assertion_count = 2
|
||||||
|
|
||||||
|
@ -1314,9 +1323,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
def test_capture_io
|
def test_capture_io
|
||||||
@assertion_count = 0
|
@assertion_count = 0
|
||||||
|
|
||||||
orig_verbose = $VERBOSE
|
non_verbose do
|
||||||
$VERBOSE = false
|
|
||||||
|
|
||||||
out, err = capture_io do
|
out, err = capture_io do
|
||||||
puts 'hi'
|
puts 'hi'
|
||||||
warn 'bye!'
|
warn 'bye!'
|
||||||
|
@ -1324,17 +1331,14 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
|
|
||||||
assert_equal "hi\n", out
|
assert_equal "hi\n", out
|
||||||
assert_equal "bye!\n", err
|
assert_equal "bye!\n", err
|
||||||
ensure
|
end
|
||||||
$VERBOSE = orig_verbose
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_capture_subprocess_io
|
def test_capture_subprocess_io
|
||||||
@assertion_count = 0
|
@assertion_count = 0
|
||||||
skip "Dunno why but the parallel run of this fails"
|
skip "Dunno why but the parallel run of this fails"
|
||||||
|
|
||||||
orig_verbose = $VERBOSE
|
non_verbose do
|
||||||
$VERBOSE = false
|
|
||||||
|
|
||||||
out, err = capture_subprocess_io do
|
out, err = capture_subprocess_io do
|
||||||
system("echo 'hi'")
|
system("echo 'hi'")
|
||||||
system("echo 'bye!' 1>&2")
|
system("echo 'bye!' 1>&2")
|
||||||
|
@ -1342,8 +1346,7 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
|
|
||||||
assert_equal "hi\n", out
|
assert_equal "hi\n", out
|
||||||
assert_equal "bye!\n", err
|
assert_equal "bye!\n", err
|
||||||
ensure
|
end
|
||||||
$VERBOSE = orig_verbose unless orig_verbose.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_class_asserts_match_refutes
|
def test_class_asserts_match_refutes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue