diff options
author | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-09-26 13:04:41 +0400 |
---|---|---|
committer | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-11-01 13:36:40 +0400 |
commit | 346ccf376c13bef58e575474a2f717b78dfa583d (patch) | |
tree | 95b3c12162d37203d1201e9fecdecf3da83cbd4b /activesupport/test | |
parent | c7e233ce47c050e086aa9eae7b0217c3d9e405dd (diff) | |
download | rails-346ccf376c13bef58e575474a2f717b78dfa583d.tar.gz rails-346ccf376c13bef58e575474a2f717b78dfa583d.tar.bz2 rails-346ccf376c13bef58e575474a2f717b78dfa583d.zip |
Kernel#capture replaced by version which can catch output from subprocesses
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/kernel_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb index 439bc87323..1583c1fa32 100644 --- a/activesupport/test/core_ext/kernel_test.rb +++ b/activesupport/test/core_ext/kernel_test.rb @@ -51,6 +51,8 @@ class KernelTest < ActiveSupport::TestCase def test_capture assert_equal 'STDERR', capture(:stderr) { $stderr.print 'STDERR' } assert_equal 'STDOUT', capture(:stdout) { print 'STDOUT' } + assert_equal "STDERR\n", capture(:stderr) { system('echo STDERR 1>&2') } + assert_equal "STDOUT\n", capture(:stdout) { system('echo STDOUT') } end end |