Sha256: 122947c3e18a3fba5d003828739583cd1800dc6e750727659e94fe6526356012
Contents?: true
Size: 453 Bytes
Versions: 18
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true require 'English' module Quality # Wrapper around IO.popen that allows exit status to be mocked in tests. class Process def initialize(full_cmd, dependencies = {}) @full_cmd = full_cmd @popener = dependencies[:popener] || IO end def run @popener.popen(@full_cmd) do |file| yield file end $CHILD_STATUS.exitstatus if $CHILD_STATUS end end end
Version data entries
18 entries across 18 versions & 1 rubygems