method
capture
v3.0.9 -
Show latest stable
- Class:
Rails::Generators::TestCase
capture(stream)public
Captures the given stream and returns it:
stream = capture(:stdout){ puts "Cool" } stream # => "Cool\n"
capture(stream)Captures the given stream and returns it:
stream = capture(:stdout){ puts "Cool" } stream # => "Cool\n"