Skip to content

Commit

Permalink
Merge pull request #312 from mikz/printer-test
Browse files Browse the repository at this point in the history
`SSHKit::Backend::Printer#test` now always returns true
  • Loading branch information
leehambley committed Dec 29, 2015
2 parents fb37ebc + bb2b005 commit 1f6fb49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions lib/sshkit/backends/printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def execute_command(cmd)

alias :upload! :execute
alias :download! :execute

def test(*)
super
true
end
end
end
end
2 changes: 1 addition & 1 deletion test/unit/backends/test_printer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1f6fb49

Please sign in to comment.