method

capture

rails latest stable - Class: Rails::Generators::TestCase

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

capture(stream)
public

Captures the given stream and returns it:

stream = capture(:stdout){ puts "Cool" }
stream # => "Cool\n"