Sha256: 2fe940e3f0e07e13f3eba9530628499c002cd459b7bc12b1917ff740bd38c33a

Contents?: true

Size: 912 Bytes

Versions: 5

Compression:

Stored size: 912 Bytes

Contents

require 'spec_helper'

describe 'base spec' do
	it 'when request is made response should be set' do
		mock_get('simple_get')
		get '/simple_get'
		expect(response).to_not be(nil)
	end

	it 'when request is made headers should be set' do
		mock_get('simple_get')
		get '/simple_get'
		expect(headers).to_not be(nil)		
	end

	it 'when request is made headers should be symbolized hash' do
		mock_get('simple_get', {'Content-Type' => 'application/json'})
		get '/simple_get'
		expect(headers).to be_kind_of(Hash)
		expect(headers.first[0]).to be_kind_of(Symbol)		
	end	

	it 'when request is made body should be set' do
		mock_get('simple_get')
		get '/simple_get'
		expect(body).to_not be(nil)		
	end

	it 'when request is made json body should be symbolized hash' do
		mock_get('simple_get')
		get '/simple_get'
		expect(json_body).to be_kind_of(Hash)
		expect(json_body.first[0]).to be_kind_of(Symbol)		
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
airborne-0.0.18 spec/airborne/base_spec.rb
airborne-0.0.17 spec/airborne/base_spec.rb
airborne-0.0.16 spec/airborne/base_spec.rb
airborne-0.0.15 spec/airborne/base_spec.rb
airborne-0.0.14 spec/airborne/base_spec.rb