Sha256: 0bff3584b687ea26faa24cb63150a0d62cc7496c89686dde0494fa2cba4f7239
Contents?: true
Size: 1.03 KB
Versions: 22
Compression:
Stored size: 1.03 KB
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 => ::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 module Type class Base def command cmd = backend.build_command('command') backend.add_pre_command(cmd) end end end end RSpec.configure do |c| c.add_setting :stdout, :default => '' c.add_setting :stderr, :default => '' end
Version data entries
22 entries across 22 versions & 1 rubygems