Sha256: e738541be07064fee0f05552b57982ffb3312b1f5c2899798a43719e84275a48
Contents?: true
Size: 423 Bytes
Versions: 24
Compression:
Stored size: 423 Bytes
Contents
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
24 entries across 24 versions & 1 rubygems