Sha256: ace1756ff2b2ea579045bebdd79dc24c678a654eec85065682fff865e169161e
Contents?: true
Size: 1.04 KB
Versions: 11
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
11 entries across 11 versions & 1 rubygems