Sha256: f8ac7601c968dfa706aa02c34d8b6bd9aee2d6b9f7f002d99e51150a252f8c07
Contents?: true
Size: 438 Bytes
Versions: 16
Compression:
Stored size: 438 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 end end end
Version data entries
16 entries across 16 versions & 1 rubygems