spec/spec_helper.rb in serverspec-0.0.17 vs spec/spec_helper.rb in serverspec-0.0.18

- old
+ new

@@ -3,10 +3,16 @@ PROJECT_ROOT = (Pathname.new(File.dirname(__FILE__)) + '..').expand_path Dir[PROJECT_ROOT.join("spec/support/**/*.rb")].each { |file| require(file) } -RSpec.configure do |c| - c.before do - c.host = test_server_host +module Serverspec + module SshHelper + def ssh_exec(cmd) + if cmd =~ /invalid/ + { :stdout => nil, :stderr => nil, :exit_code => 1, :exit_signal => nil } + else + { :stdout => nil, :stderr => nil, :exit_code => 0, :exit_signal => nil } + end + end end end