Sha256: f6fad37ec5a41a5a02dff7f912e888cbf40ef27a55b257a08c880a4c2987daee

Contents?: true

Size: 750 Bytes

Versions: 8

Compression:

Stored size: 750 Bytes

Contents

require 'spec_helper'

describe Request do
  let (:subject) { Request.new double }

  it { should be_a(Rack::Request) }
end

describe Response do
  it { should be_a(Rack::Response) }

  describe '#raw_body' do
    it 'should be accesible when the response was initialized' do
      raw_body = double
      res = Response.new raw_body
      res.raw_body.should == raw_body
    end

    it 'should accesible after body was set' do
      res = Response.new
      raw_body = double
      res.body = raw_body
      res.raw_body.should == raw_body
    end

    it 'should set the iterable as the raw body as well' do
      res = Response.new
      raw_body = ['one', 'two']
      res.body = raw_body
      res.raw_body.should == raw_body
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nyny-3.0.1 spec/primitives_spec.rb
nyny-2.2.1 spec/primitives_spec.rb
nyny-2.1.1 spec/primitives_spec.rb
nyny-2.1.0 spec/primitives_spec.rb
nyny-2.0.0 spec/primitives_spec.rb
nyny-1.0.2 spec/primitives_spec.rb
nyny-1.0.1 spec/primitives_spec.rb
nyny-1.0.0 spec/primitives_spec.rb