Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Net::HTTP < Net::Protocol
- def connect
- end
- end
- class Net::HTTPResponse
- def body=(content)
- @body = content
- @read = true
- end
- end
- class Net::HTTP < Net::Protocol
- mattr_accessor :xml_data
- def post(path, body, headers)
- raise "Broken mock" if !self.xml_data
- res = Net::HTTPSuccess.new('1.2', '200', 'OK')
- res.body = self.xml_data
- return res
- end
- end
Add Comment
Please, Sign In to add comment