Sha256: 89e9ac27c7db46400b39b3aabedb54e81e01dc93022ff79da3d2458006b9add1

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe RackBox, 'custom request headers' do

  before do
    @rack_app = lambda {|env| [ 200, { }, env.inspect ] }
  end

  it "#request should take any non-special options and assume they're request headers" do
    RackBox.request(@rack_app, '/').body.should_not include('"HTTP_ACCEPT"=>"application/json"')
    RackBox.request(@rack_app, '/', 'HTTP_ACCEPT' => 'application/json').body.should include('"HTTP_ACCEPT"=>"application/json"')
  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
remi-rackbox-1.1.1 spec/custom_request_header_specs.rb
remi-rackbox-1.1.2 spec/custom_request_header_specs.rb
remi-rackbox-1.1.3 spec/custom_request_header_specs.rb
remi-rackbox-1.1.4 spec/custom_request_header_specs.rb
remi-rackbox-1.1.5 spec/custom_request_header_specs.rb
remi-rackbox-1.1.6 spec/custom_request_header_specs.rb
eol_rackbox-1.1.7 spec/custom_request_header_specs.rb