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

Version Path
contentful-1.2.2 spec/support/json_responses.rb
contentful-1.2.1 spec/support/json_responses.rb
contentful-1.2.0 spec/support/json_responses.rb
contentful-1.1.1 spec/support/json_responses.rb
contentful-1.1.0 spec/support/json_responses.rb
contentful-1.0.2 spec/support/json_responses.rb
contentful-1.0.1 spec/support/json_responses.rb
contentful-1.0.0 spec/support/json_responses.rb
contentful-0.12.0 spec/support/json_responses.rb
contentful-0.11.0 spec/support/json_responses.rb
contentful-0.10.0 spec/support/json_responses.rb
contentful-0.9.0 spec/support/json_responses.rb
contentful-0.8.0 spec/support/json_responses.rb
contentful-0.7.0 spec/support/json_responses.rb
contentful-0.6.0 spec/support/json_responses.rb
contentful-0.5.0 spec/support/json_responses.rb
contentful-0.4.0 spec/support/json_responses.rb
contentful-0.3.5 spec/support/json_responses.rb