File: process.rb

package info (click to toggle)
ruby-async-process 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 172 kB
  • sloc: ruby: 129; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require "async/process"
require "sus/fixtures/async"

describe Async::Process do
	include Sus::Fixtures::Async::ReactorContext
	
	it "should execute sub-process" do
		status = subject.spawn("ls", "-lah")
		
		expect(status).to be(:success?)
	end
	
	it "can capture output" do
		output = subject.capture("ls", "-lah")
		
		expect(output).to be(:include?, "async-process")
	end
end