Skip to content

Instantly share code, notes, and snippets.

@marzdgzmn
Created November 8, 2018 05:37
Show Gist options
  • Save marzdgzmn/b3d8ec6e60bc700a5fd1c8b58247ff8d to your computer and use it in GitHub Desktop.
Save marzdgzmn/b3d8ec6e60bc700a5fd1c8b58247ff8d to your computer and use it in GitHub Desktop.
def sync
Database.update_sync_result(FAILED)
log_error reuslt.output
exit
end
allow(sync).to receive(:exit).and_throw(:exit)
expect(DB).to receive(:update_sync_result).with(SyncStatus::FAILED)
expect { sync.run }.to throw_symbol :exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment