Sha256: 97d22d0bb3e29d009745d8013cd2d8d45a4aa235c147eb6cb20094b5e63acd95
Contents?: true
Size: 412 Bytes
Versions: 21
Compression:
Stored size: 412 Bytes
Contents
require 'English' module Quality # Wrapper around IO.popen that allows exit status to be mocked in tests. class ProcessRunner 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
21 entries across 21 versions & 1 rubygems