spec/httpi/response_spec.rb in httpi-0.7.7 vs spec/httpi/response_spec.rb in httpi-0.7.8

- old
+ new

@@ -26,17 +26,33 @@ it "should always return an Integer" do response = HTTPI::Response.new "200", {}, "" response.code.should == 200 end end + + describe "#multipart" do + it "should return false" do + response.should_not be_multipart + end + end end context "empty" do let(:response) { HTTPI::Response.new 204, {}, nil } describe "#body" do it "should return an empty String" do response.body.should == "" + end + end + end + + context "multipart" do + let(:response) { HTTPI::Response.new 200, { "Content-Type" => "multipart/related" }, "multipart" } + + describe "#multipart" do + it "should return true" do + response.should be_multipart end end end context "error" do