aboutsummaryrefslogtreecommitdiff
path: root/spec/unit/response/response_spec.rb
blob: a0d423fa4e9561109241617d791b5a993d1f9cc1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'spec_helper'

describe Zero::Response, '#finish' do
  subject { Zero::Response.new() }
  
  it "returns an array within status header and body" do
    subject.status = 200
    subject.header = {}
    subject.body   = []

    value = subject.to_a

    value.should be_an_instance_of(Array)
    value[0].should eq(200) # Status code
    value[1].should eq({})  # Headers
    value[2].should eq([])  # Body
  end

end