Sha256: 9bb3eff269bbcff1b9696fa801682b240e48512cc32a95ec2911d7cc4e3cfa08

Contents?: true

Size: 367 Bytes

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
flip_fab-1.0.1 spec/support/test_rack_context.rb
flip_fab-1.0.0 spec/support/test_rack_context.rb
flip_fab-0.0.1 spec/support/test_rack_context.rb