Sha256: 7028302fb35b8b843baae4171f86cb146828ae10a838778c4afc98e666d69643
Contents?: true
Size: 648 Bytes
Versions: 16
Compression:
Stored size: 648 Bytes
Contents
require 'sinatra/base' # Canvas responses can be mocked out here. You can get the correct # format by hitting a real Canvas API for the route you're looking at, # and then save the result as a .json file in spec/support/fixtures/canvas_responses class FakeCanvas < Sinatra::Base get '/api/v1/accounts/self/terms' do json_response 200, 'terms.json' end get '/sample_report_download' do json_response 200, 'terms.json' end private def json_response(response_code, file_name) content_type :json status response_code File.open(File.dirname(__FILE__) + '/fixtures/canvas_responses/' + file_name, 'rb').read end end
Version data entries
16 entries across 16 versions & 1 rubygems