diff options
author | Ryan Davis <ryand@zenspider.com> | 2013-04-27 14:05:06 -0800 |
---|---|---|
committer | Ryan Davis <ryand@zenspider.com> | 2013-04-27 14:05:06 -0800 |
commit | a4d3136ca0c91f6e8c3e53c14d716a879004c6e5 (patch) | |
tree | bef15ba3e53e34425a0a5ee2f61d709b9cd9b4d0 /test | |
parent | 324cd8f952d88f3db996abdd0673062e13e17e61 (diff) | |
download | hoe-a4d3136ca0c91f6e8c3e53c14d716a879004c6e5.tar.gz |
- Fixed an ancient test to use capture_subprocess_io. More reliable.
[git-p4: depot-paths = "//src/hoe/dev/": change = 8466]
Diffstat (limited to 'test')
-rw-r--r-- | test/test_hoe_debug.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/test/test_hoe_debug.rb b/test/test_hoe_debug.rb index f43676d..5cbafce 100644 --- a/test/test_hoe_debug.rb +++ b/test/test_hoe_debug.rb @@ -51,34 +51,18 @@ class TestHoeDebug < MiniTest::Unit::TestCase e = nil - out = capture_STDOUT do + out, err = capture_subprocess_io do e = assert_raises RuntimeError do check_manifest end end assert_match %r%^Command failed with status%, e.message - assert_match %r%^\+missing.rb%, out + assert_equal "", err end end - def capture_STDOUT - orig_STDOUT = STDOUT.dup - - Tempfile.open __name__ do |io| - STDOUT.reopen io - - yield - - io.flush - - return File.read io.path - end - ensure - STDOUT.reopen orig_STDOUT - end - def in_tmpdir old_LOAD_PATH = $LOAD_PATH.dup $LOAD_PATH.map! { |path| File.expand_path path } |