Sha256: 36293245309f42375be6fccf0daee2760b8826f1ab846686862836adf2219ecd
Contents?: true
Size: 390 Bytes
Versions: 2
Compression:
Stored size: 390 Bytes
Contents
module RequestMacros def last_json return @_last_json if @_last_json_id == last_response.object_id @_last_json_id = last_response.object_id @_last_json = last_response.body.length > 0 ? MultiJson.load(last_response.body) : nil rescue MultiJson::LoadError raise "Failed to parse JSON:\n\n#{last_response.body}" end def last_status last_response.status end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tincan-0.1.6 | spec/support/request_macros.rb |
tincan-0.1.5 | spec/support/request_macros.rb |