Sha256: 17ea5be351834ff610d812af53d06d4a469ef1cc7d4b1fc87e656c8468eae456
Contents?: true
Size: 1.04 KB
Versions: 9
Compression:
Stored size: 1.04 KB
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 if ApiClient::Dispatcher.respond_to?(:patch) 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
9 entries across 9 versions & 1 rubygems