Sha256: 0c08d32647ee91889d60372f8ecaef28e53e4a7657bbab574d2fd4242bbc6b4d
Contents?: true
Size: 834 Bytes
Versions: 5
Compression:
Stored size: 834 Bytes
Contents
require 'serverspec' require 'pathname' require 'rspec/mocks/standalone' set :backend, :exec PROJECT_ROOT = (Pathname.new(File.dirname(__FILE__)) + '..').expand_path module Specinfra module Backend class Exec < Base def run_command cmd CommandResult.new({ :stdout => ::Specinfra.configuration.stdout, :stderr => ::Specinfra.configuration.stderr, :exit_status => cmd =~ /invalid/ ? 1 : 0, :exit_signal => nil, }) end end class Cmd < Base def run_command cmd CommandResult.new({ :stdout => ::Specinfra.configuration.stdout, :stderr => ::Specinfra.configuration.stderr, :exit_status => cmd.to_s =~ /invalid/ ? 1 : 0, :exit_signal => nil, }) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems