Skip to content

Instantly share code, notes, and snippets.

@hartmantis
Created May 22, 2013 14:03
Show Gist options
  • Save hartmantis/5627750 to your computer and use it in GitHub Desktop.
Save hartmantis/5627750 to your computer and use it in GitHub Desktop.
...
let(:object) { Testing::Test.new }
let(:run_command) { stub(:stdout => 'Some string') }
let(:shellout) { stub(:run_command => run_command) }
it 'shells out' do
Mixlib::ShellOut.stub(:new).and_return(shellout)
expect(object.shellout).to eq('Some string')
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment