daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jan 23rd, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stdout, status = Open3.capture2(command)
  2.  
  3. if status.success?
  4.   puts stdout
  5. else
  6.   puts stdout
  7.   throw "error: could not execute"
  8. end
  9.    
  10. it "throws an error" do
  11.   status = double("status message", :success? => false)
  12.   allow(Open3).to receive(:capture2).and_return("wat?", status)
  13.   ScreenShotWorker.new.perform(url: "www.google.com")
  14.   expect(Open3).to have_received(:capture2)
  15. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top