Sha256: 1d36e9642ae0954d0ae7e4649d4485003f82cb531ea021d7d3c1664805534a1a

Contents?: true

Size: 899 Bytes

Versions: 27

Compression:

Stored size: 899 Bytes

Contents

require 'serverspec'
require 'pathname'

include Serverspec::Helper::Exec

PROJECT_ROOT = (Pathname.new(File.dirname(__FILE__)) + '..').expand_path

Dir[PROJECT_ROOT.join("spec/support/**/*.rb")].each { |file| require(file) }

module Serverspec
  module Backend
    class Exec
      def run_command(cmd)
        if cmd =~ /invalid/
          {
            :stdout      => ::RSpec.configuration.stdout,
            :stderr      => ::RSpec.configuration.stderr,
            :exit_status => 1,
            :exit_signal => nil
          }
        else
          {
            :stdout      => ::RSpec.configuration.stdout,
            :stderr      => ::RSpec.configuration.stderr,
            :exit_status => 0,
            :exit_signal => nil
          }
        end
      end
    end
  end
end

RSpec.configure do |c|
  c.add_setting :stdout, :default => ''
  c.add_setting :stderr, :default => ''
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
serverspec-0.4.14 spec/spec_helper.rb
serverspec-0.4.13 spec/spec_helper.rb
serverspec-0.4.12 spec/spec_helper.rb
serverspec-0.4.11 spec/spec_helper.rb
serverspec-0.4.10 spec/spec_helper.rb
serverspec-0.4.9 spec/spec_helper.rb
serverspec-0.4.8 spec/spec_helper.rb
serverspec-0.4.7 spec/spec_helper.rb
serverspec-0.4.6 spec/spec_helper.rb
serverspec-0.4.5 spec/spec_helper.rb
serverspec-0.4.4 spec/spec_helper.rb
serverspec-0.4.3 spec/spec_helper.rb
serverspec-0.4.2 spec/spec_helper.rb
serverspec-0.4.1 spec/spec_helper.rb
serverspec-0.4.0 spec/spec_helper.rb
serverspec-0.3.2 spec/spec_helper.rb
serverspec-0.3.1 spec/spec_helper.rb
serverspec-0.3.0 spec/spec_helper.rb
serverspec-0.2.28 spec/spec_helper.rb
serverspec-0.2.27 spec/spec_helper.rb