Sha256: f744814893876736318ac7aa4b097323b39593f4c77a5f7717732bbefee38fad
Contents?: true
Size: 787 Bytes
Versions: 22
Compression:
Stored size: 787 Bytes
Contents
module Serverspec module Type class Command < Base def return_stdout?(content) if content.instance_of?(Regexp) stdout =~ content else stdout.strip == content end end def return_stderr?(content) if content.instance_of?(Regexp) stderr =~ content else stderr.strip == content end end def return_exit_status?(status) exit_status == status end def stdout command_result.stdout end def stderr command_result.stderr end def exit_status command_result.exit_status.to_i end private def command_result() @command_result ||= backend.run_command(@name) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems