Sha256: 666109aabd0a8856e74c8242caa1b86c54e52cb3c20286c9acf30b3a2defc055
Contents?: true
Size: 454 Bytes
Versions: 13
Compression:
Stored size: 454 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
13 entries across 13 versions & 1 rubygems