Sha256: 4b25211380a20054f758536527ae73028ca3a52abe742ee1975acc600959502a
Contents?: true
Size: 1.62 KB
Versions: 26
Compression:
Stored size: 1.62 KB
Contents
require File.dirname(__FILE__) + '/../spec_helper' require 'resourceful' describe Resourceful do describe ".get()" do it "should be performable on a resource and return a response" do response = Resourceful.get('http://localhost:42682/') response.should be_kind_of(Resourceful::Response) end end describe ".post()" do it "should be performable on a resource and return a response" do response = Resourceful.post('http://localhost:42682/') response.should be_kind_of(Resourceful::Response) end it "should require Content-Type be set if a body is provided" do lambda { Resourceful.post('http://localhost:42682/', {}, 'body') }.should raise_error(Resourceful::MissingContentType) end end describe ".put()" do it "should be performable on a resource and return a response" do response = Resourceful.put('http://localhost:42682/') response.should be_kind_of(Resourceful::Response) end it "should require Content-Type be set if a body is provided" do lambda { Resourceful.put('http://localhost:42682/', "some text", {}) }.should raise_error(Resourceful::MissingContentType) end it "should allow the entity-body to be nil" do lambda { Resourceful.put('http://localhost:42682/', nil, {}) }.should_not raise_error(ArgumentError) end end describe ".delete()" do it "should be performable on a resource and return a response" do response = Resourceful.delete('http://localhost:42682/') response.should be_kind_of(Resourceful::Response) end end end
Version data entries
26 entries across 26 versions & 3 rubygems