From 93b158caad9821fb9719905e117b5ddb9154c41c Mon Sep 17 00:00:00 2001 From: Stephan Renatus Date: Fri, 4 Dec 2015 17:17:51 +0100 Subject: [PATCH] adept integration test to changes in command_wrapper command_wrapper tries to verify the connection (which includes sudo) using a call to "echo". If this fails, it'll raise an error. This change is now reflected in the test. fixes #34. --- test/integration/sudo/passwd.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/sudo/passwd.rb b/test/integration/sudo/passwd.rb index f2c89fc5..9ec495a2 100644 --- a/test/integration/sudo/passwd.rb +++ b/test/integration/sudo/passwd.rb @@ -10,8 +10,8 @@ end it 'is not running sudo without password' do - run_as('whoami', { sudo: true }) - .exit_status.wont_equal 0 + err = ->{Train.create('local', { sudo: true }).connection}.must_raise Train::UserError + err.message.must_match /Sudo requires a password/ end it 'is running passwd sudo' do