Sha256: 2a3194159f9b96d384191954dfa57240fe645f970b6484fc7c32b9eaf85fa4ca

Contents?: true

Size: 548 Bytes

Versions: 5

Compression:

Stored size: 548 Bytes

Contents

require 'spec_helper'

describe 'expect_status' do
  it 'should verify correct status code' do
    mock_get('simple_get')
    get '/simple_get'
    expect_status 200
  end

  it 'should fail when incorrect status code is returned' do
    mock_get('simple_get')
    get '/simple_get'
    expect { expect_status 123 }.to raise_error
  end

  it 'should translate symbol codes to whatever is appropriate for the request' do
    mock_get('simple_get')
    get '/simple_get'
    expect_status :ok
    expect_status 200
    expect_status '200'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
airborne-0.1.20 spec/airborne/expectations/expect_status_spec.rb
airborne-0.1.19 spec/airborne/expectations/expect_status_spec.rb
airborne-0.1.18 spec/airborne/expectations/expect_status_spec.rb
airborne-0.1.17 spec/airborne/expectations/expect_status_spec.rb
airborne-0.1.16 spec/airborne/expectations/expect_status_spec.rb