[rspec-users] mocking the shell command (Kernel module)

Joaquin Rivera Padron joahking at gmail.com
Fri Sep 12 09:10:56 EDT 2008

hello there,
what is the best (or any) way of mocking the running of shell commands?

code like the following:

%{ ls }


it "should list the directory contents"
  shell = mock(Object) # %{} lives in Kernel module and its sugar for `

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080912/88e9d1bb/attachment.html>

More information about the rspec-users mailing list