Sha256: 8e0ca1571305f4fd86cee017c70198fb4f446079e7fb46b7f6da55448a08ba98
Contents?: true
Size: 967 Bytes
Versions: 3
Compression:
Stored size: 967 Bytes
Contents
require 'serverspec' require 'pathname' require 'rspec/mocks/standalone' 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 => ::Serverspec.configuration.stdout, :stderr => ::Serverspec.configuration.stderr, :exit_status => 1, :exit_signal => nil } else { :stdout => ::Serverspec.configuration.stdout, :stderr => ::Serverspec.configuration.stderr, :exit_status => 0, :exit_signal => nil } end end end end module Type class Base def command cmd = backend.build_command('command') backend.add_pre_command(cmd) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
serverspec-0.6.16 | spec/spec_helper.rb |
serverspec-0.6.15 | spec/spec_helper.rb |
serverspec-0.6.13 | spec/spec_helper.rb |