Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSHKit::Backend::Printer#test now always returns true #312

Merged
merged 1 commit into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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