Sha256: 88d88174497139fd85976ffab7ea7f8a29d6a36ebc8f60cbd46ebba33292ba50
Contents?: true
Size: 383 Bytes
Versions: 3
Compression:
Stored size: 383 Bytes
Contents
module ProcessHelper def run(args, stdin=nil) if args.kind_of?(String) args = [args] end stub_const('ARGV', args) if stdin.kind_of?(Array) stdin = stdin.join("\n") end stdin_double = double allow(stdin_double).to receive(:read).and_return(stdin) stub_const('STDIN', stdin_double) process = Ru::Process.new process.run end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ru-0.1.4 | spec/support/process_helper.rb |
ru-0.1.3 | spec/support/process_helper.rb |
ru-0.1.2 | spec/support/process_helper.rb |