Sha256: 6f10838986a846d59d9721f1c1146ad8073e2d6939eb35f8113f516340991b3c

Contents?: true

Size: 846 Bytes

Versions: 6

Compression:

Stored size: 846 Bytes

Contents

require 'serverspec'
require 'pathname'
require 'rspec/mocks/standalone'

include Specinfra::Helper::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

6 entries across 6 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta14 spec/spec_helper.rb
serverspec-2.0.0.beta13 spec/spec_helper.rb
serverspec-2.0.0.beta12 spec/spec_helper.rb
serverspec-2.0.0.beta11 spec/spec_helper.rb
serverspec-2.0.0.beta10 spec/spec_helper.rb
serverspec-2.0.0.beta9 spec/spec_helper.rb