Sha256: 9ed11892c8f692d39ba29b86c931c495f75f0141b62420831d5c40ad13bebafb
Contents?: true
Size: 768 Bytes
Versions: 4
Compression:
Stored size: 768 Bytes
Contents
require 'spec_helper' module Yarn describe Response do before do @response = Response.new end describe "#status" do it "should is a HTTP status code" do @response.status = 404 @response.status.should == 404 end end describe "#headers" do it "should is a headers hash" do @response.headers = { "Connection" => "Close" } @response.headers["Connection"].should == "Close" end end describe "#body" do it "should be an array containing the response body" do @response.body << "Line 1" << "Line 2" @response.body.size.should == 2 @response.body[0].should == "Line 1" @response.body[1].should == "Line 2" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
yarn-0.1.0 | spec/yarn/response_spec.rb |
yarn-0.0.9 | spec/yarn/response_spec.rb |
yarn-0.0.2 | spec/yarn/response_spec.rb |
yarn-0.0.1 | spec/yarn/response_spec.rb |