summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2013-04-27 14:05:06 -0800
committerRyan Davis <ryand@zenspider.com>2013-04-27 14:05:06 -0800
commita4d3136ca0c91f6e8c3e53c14d716a879004c6e5 (patch)
treebef15ba3e53e34425a0a5ee2f61d709b9cd9b4d0 /test
parent324cd8f952d88f3db996abdd0673062e13e17e61 (diff)
downloadhoe-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.rb20
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 }