Sha256: 118a3446652f6f0e263fbeed150a2b66c7de5dc5c699115488684d5ceda2d4c0
Contents?: true
Size: 551 Bytes
Versions: 53
Compression:
Stored size: 551 Bytes
Contents
class Ey::Core::Client class Real def get_message(params={}) id = params["id"] url = params["url"] request( :path => "messages/#{id}", :url => url ) end end class Mock def get_message(params={}) identity = resource_identity(params) if message = self.data[:messages].values.detect { |m| m["id"] == identity } response( :body => {"message" => message}, :status => 200, ) else response(status: 404) end end end end
Version data entries
53 entries across 53 versions & 3 rubygems