0
在Jruby 9.1.7.0中運行黃瓜腳本。輸出轉到STDOUT。我怎樣才能將它保存到本地變量?如何從Cucumber :: CLI :: Main.execute獲取輸出(STDOUT)到變量
require 'cucumber'
require 'stringio'
@output = StringIO.new
features = 'features/first.feature'
args = features.split.concat %w(-f html)
# Run cucumber
begin
# output goes to STDOUT
Cucumber::Cli::Main.new(args).execute!
rescue SystemExit
puts "Cucumber calls @kernel.exit(), killing your script unless you rescue"
end