0
0

Restructure response specs

Also no change in behaviour
This commit is contained in:
Stormwind 2012-11-18 16:38:38 +01:00
parent e6e3b0bd27
commit 2e073a07fa

View File

@ -1,8 +1,9 @@
require 'spec_helper' require 'spec_helper'
describe Zero::Response, '#finish' do describe Zero::Response do
subject { Zero::Response.new() } subject { Zero::Response.new() }
describe '#finish' do
it "returns an array within status header and body" do it "returns an array within status header and body" do
subject.status = 200 subject.status = 200
subject.header = {} subject.header = {}
@ -17,7 +18,7 @@ describe Zero::Response, '#finish' do
end end
end end
describe Zero::Response, '#status' do describe '#status' do
it "must return the status always as an integer" do it "must return the status always as an integer" do
subject.status = "foobar" subject.status = "foobar"
subject.status.should eq(0) subject.status.should eq(0)
@ -31,14 +32,16 @@ describe Zero::Response, '#status' do
end end
end end
describe Zero::Response, '#header' do describe '#header' do
it "must return an empty hash, if no header was set" do it "must return an empty hash, if no header was set" do
subject.header.should eq({}) subject.header.should eq({})
end end
end end
describe Zero::Response, '#body' do describe '#body' do
it "must return an empty array, if no body was set" do it "must return an empty array, if no body was set" do
subject.body.should eq([]) subject.body.should eq([])
end end
end end
end