Sha256: 654ab64fe5b771e556aa39a5918dcca89b64315c67f1b12de7e8621bf5823ea3
Contents?: true
Size: 745 Bytes
Versions: 35
Compression:
Stored size: 745 Bytes
Contents
require File.dirname(__FILE__) + "/../spec_helper" module Resourceful describe Resource do before do @http_adapter = stub(:http_adapter) http = Resourceful::HttpAccessor.new(:http_adapter => @http_adapter) @resource = http.resource('http://foo.example') end describe "POSTing" do it "should use bodies content type as the request content-type if it is known" do @http_adapter.should_receive(:make_request).with(anything, anything, anything, hash_including('Content-Type' => 'application/x-special-type')).and_return([200, {}, ""]) body = stub(:body, :content_type => 'application/x-special-type', :read => "hello there") @resource.post(body) end end end end
Version data entries
35 entries across 35 versions & 5 rubygems