Sha256: 71046fdbe0e395654620ad64af8cd524934f529936955bf5946ea164931a17af
Contents?: true
Size: 431 Bytes
Versions: 18
Compression:
Stored size: 431 Bytes
Contents
require 'multi_json' def raw_fixture(which, status = 200, _as_json = false) object = Object.new stub(object).status { status } stub(object).headers { {} } stub(object).to_s { File.read File.dirname(__FILE__) + "/../fixtures/json_responses/#{which}.json" } object end def json_fixture(which, _as_json = false) MultiJson.load( File.read File.dirname(__FILE__) + "/../fixtures/json_responses/#{which}.json" ) end
Version data entries
18 entries across 18 versions & 1 rubygems