method
capture
rails 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"