Sha256: dc308d38a0fa3208bf823f536e4c46569759b05fe8f6a515881b0f7c1104a15f
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
require 'sinatra/base' class FakeANN < Sinatra::Base get '/encyclopedia/api.xml' do case params[:anime] when "11770" xml_response 200, 'steins_gate.xml' else xml_response 200, 'no_result.xml' end end private def xml_response(response_code, file_name) content_type :xml status response_code body File.open("#{File.dirname(__FILE__)}/fixtures/#{file_name}", 'rb').read end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ann_wrapper-1.1.4 | spec/support/fake_ann.rb |