This could be written as:
```ruby
@knife.ssh_command.should include("echo #{@knife.config[:ssh_password]} | sudo -S")
```