Sha256: 01f9aefb066a60b4dbd4523b17ce01f92ee07ea7fd9a2e49c40b320d55208a30

Contents?: true

Size: 367 Bytes

Versions: 8

Compression:

Stored size: 367 Bytes

Contents

class TestRackContext
  include FlipFab::Helper

  attr_reader :request, :response

  def initialize(cookies, host)
    @request  = Rack::Request.new('HTTP_COOKIE' => cookies, 'HTTP_HOST' => host)
    @response = Rack::Response.new
    request.cookies.each { |k, v| response.set_cookie k, v }
  end

  def response_cookies
    response.header['Set-Cookie']
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
flip_fab-1.1.21 spec/support/test_rack_context.rb
flip_fab-1.1.20 spec/support/test_rack_context.rb
flip_fab-1.1.19 spec/support/test_rack_context.rb
flip_fab-1.1.18 spec/support/test_rack_context.rb
flip_fab-1.0.18 spec/support/test_rack_context.rb
flip_fab-1.0.17 spec/support/test_rack_context.rb
flip_fab-1.0.16 spec/support/test_rack_context.rb
flip_fab-1.0.2 spec/support/test_rack_context.rb