diff options
author | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 17:43:39 +0100 |
---|---|---|
committer | Stormwind <stormwind@stormwinds-page.de> | 2012-11-23 17:43:39 +0100 |
commit | 963adb8ddca4c0a5470deaa50ca5f115ed7b0f94 (patch) | |
tree | 450b620738dad747ba4f38eaf29312d094d6c4ff /spec/unit/response | |
parent | 2b79c3e840bc45eaebffedfd17edafd2c313bbb3 (diff) |
content_length sets the Content-Length to 0
The method content_length creates a header named Content-Length and sets
its value to 0.
Diffstat (limited to 'spec/unit/response')
-rw-r--r-- | spec/unit/response/response_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/response/response_spec.rb b/spec/unit/response/response_spec.rb index d22acdd..0bb0c4e 100644 --- a/spec/unit/response/response_spec.rb +++ b/spec/unit/response/response_spec.rb @@ -16,6 +16,9 @@ describe Zero::Response do value[1].should eq({}) # Headers value[2].should eq([]) # Body end + + it "returns the content length in the header" do + end end describe '#status' do @@ -44,4 +47,12 @@ describe Zero::Response do end end + describe '#content_length' do + it "sets the content_length to 0, if there is no content" do + subject.content_length + + subject.header['Content-Length'].should eq(0) + end + end + end
\ No newline at end of file |