diff --git a/CHANGELOG.md b/CHANGELOG.md index 84487ee7..0e96cddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ appear at the top. @steved * `SSHKit::Formatter::Abstract` now accepts an optional Hash of options [PR #308](https://github.com/capistrano/sshkit/pull/308) @mattbrictson + * `SSHKit::Backend::Printer#test` now always returns true + [PR #312](https://github.com/capistrano/sshkit/pull/312) @mikz ## 1.8.1 diff --git a/lib/sshkit/backends/printer.rb b/lib/sshkit/backends/printer.rb index d9c5277d..483a9597 100644 --- a/lib/sshkit/backends/printer.rb +++ b/lib/sshkit/backends/printer.rb @@ -10,6 +10,11 @@ def execute_command(cmd) alias :upload! :execute alias :download! :execute + + def test(*) + super + true + end end end end diff --git a/test/unit/backends/test_printer.rb b/test/unit/backends/test_printer.rb index 9f6d86de..99756eb6 100644 --- a/test/unit/backends/test_printer.rb +++ b/test/unit/backends/test_printer.rb @@ -28,7 +28,7 @@ def test_execute end def test_test_method - printer.test '[ -d /some/file ]' + assert printer.test('[ -d /some/file ]'), 'test should return true' assert_output_lines( ' DEBUG [aaaaaa] Running [ -d /some/file ] on example.com',