Sha256: 0e37d8c5d6efee3a05990d2d22a7813781c85e48b34a20c2ce53a7d02f07916b
Contents?: true
Size: 390 Bytes
Versions: 16
Compression:
Stored size: 390 Bytes
Contents
module ApiTestHelpers def response_body response.body.strip end def response_body_json ActiveSupport::JSON.decode(response_body) end def response_body_jsonp(callback) jsonp_callback(callback).match(response_body) end def jsonp_callback(callback) /\A#{callback}\((.*),\s+\d{3}\)\z/ end end RSpec.configure do |c| c.include ApiTestHelpers end
Version data entries
16 entries across 16 versions & 2 rubygems