Skip to content

Commit 1f6fb49

Browse files
committed
Merge pull request #312 from mikz/printer-test
`SSHKit::Backend::Printer#test` now always returns true
2 parents fb37ebc + bb2b005 commit 1f6fb49

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ appear at the top.
1515
@steved
1616
* `SSHKit::Formatter::Abstract` now accepts an optional Hash of options
1717
[PR #308](https://github.com/capistrano/sshkit/pull/308) @mattbrictson
18+
* `SSHKit::Backend::Printer#test` now always returns true
19+
[PR #312](https://github.com/capistrano/sshkit/pull/312) @mikz
1820

1921
## 1.8.1
2022

lib/sshkit/backends/printer.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ def execute_command(cmd)
1010

1111
alias :upload! :execute
1212
alias :download! :execute
13+
14+
def test(*)
15+
super
16+
true
17+
end
1318
end
1419
end
1520
end

test/unit/backends/test_printer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_execute
2828
end
2929

3030
def test_test_method
31-
printer.test '[ -d /some/file ]'
31+
assert printer.test('[ -d /some/file ]'), 'test should return true'
3232

3333
assert_output_lines(
3434
' DEBUG [aaaaaa] Running [ -d /some/file ] on example.com',

0 commit comments

Comments
 (0)