Sha256: 5e34e9b427bb0aa9ac584f57162e0d8d2cf0e3467df76ca74f83d4118df032d6
Contents?: true
Size: 1020 Bytes
Versions: 6
Compression:
Stored size: 1020 Bytes
Contents
require 'spec_helper' describe ApiClient::Dispatcher do before :each do stub_request(:any, 'http://api.example.com/user/5').to_return(:body => 'asd') end describe '.get' do it 'should return the request' do ApiClient::Dispatcher.get('http://api.example.com/user/5', {}).body.should == ('asd') end end describe '.post' do it 'should return the request' do ApiClient::Dispatcher.post('http://api.example.com/user/5', {}, {}).body.should == ('asd') end end describe '.put' do it 'should return the request' do ApiClient::Dispatcher.put('http://api.example.com/user/5', {}, {}).body.should == ('asd') end end describe '.patch' do it 'should return the request' do ApiClient::Dispatcher.patch('http://api.example.com/user/5', {}, {}).body.should == ('asd') end end describe '.delete' do it 'should return the request' do ApiClient::Dispatcher.delete('http://api.example.com/user/5', {}).body.should == ('asd') end end end
Version data entries
6 entries across 6 versions & 1 rubygems