You should prolly do something more like what I did here to help readability:
https://github.com/atalanta/cucumber-chef/blob/master/lib/cucumber/chef/steps/ssh_steps.rb#L63-L64