Adds Kernel.capture_stdout(&block). Useful e.g. for testing command line tools
Ruby
Switch branches/tags
Nothing to show
Latest commit 78f0a10 Jun 10, 2010 Sven Fuchs add readme
Permalink
Failed to load latest commit information.
lib initial commit Jun 10, 2010
test initial commit Jun 10, 2010
README.textile add readme Jun 10, 2010
capture_stdout.gemspec initial commit Jun 10, 2010

README.textile

capture_stdout

Adds Kernel.capture_stdout(&block)

Useful e.g. for testing command line tools

  string = 'yeah'
  output = capture_stdout { print(string) }
  assert_equal string, output  

Installation

  $ gem install capture_stdout