Guest User

Untitled

a guest
Feb 19th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. class Net::HTTP < Net::Protocol
  2. def connect
  3. end
  4. end
  5.  
  6. class Net::HTTPResponse
  7. def body=(content)
  8. @body = content
  9. @read = true
  10. end
  11. end
  12.  
  13. class Net::HTTP < Net::Protocol
  14. mattr_accessor :xml_data
  15. def post(path, body, headers)
  16. raise "Broken mock" if !self.xml_data
  17. res = Net::HTTPSuccess.new('1.2', '200', 'OK')
  18. res.body = self.xml_data
  19. return res
  20. end
  21. end
Add Comment
Please, Sign In to add comment