Sha256: ca4c5735952bbf66eb356ff46354bf26c12495c1c6a3817a44861dc09e42cb36
Contents?: true
Size: 962 Bytes
Versions: 60
Compression:
Stored size: 962 Bytes
Contents
require 'spec_helper' describe FbGraph::Debugger::RequestFilter do let(:resource_endpoint) { 'https://graph.facebook.com/matake' } let(:request) { HTTP::Message.new_request(:get, URI.parse(resource_endpoint)) } let(:response) { HTTP::Message.new_response({:hello => 'world'}.to_json) } let(:request_filter) { FbGraph::Debugger::RequestFilter.new } describe '#filter_request' do it 'should log request' do FbGraph.logger.should_receive(:info).with( "======= [FbGraph] API REQUEST STARTED =======\n" + request.dump ) request_filter.filter_request(request) end end describe '#filter_response' do it 'should log response' do FbGraph.logger.should_receive(:info).with( "--------------------------------------------------\n" + response.dump + "\n======= [FbGraph] API REQUEST FINISHED =======" ) request_filter.filter_response(request, response) end end end
Version data entries
60 entries across 60 versions & 1 rubygems