or you could do something like this:
https://github.com/atalanta/cucumber-chef/blob/master/lib/cucumber/chef/steps/ssh_steps.rb#L126