Sha256: 1629b45828413123669e2f6677be4dd2c36d970db48ea885f7453b418fb574fc
Contents?: true
Size: 891 Bytes
Versions: 5
Compression:
Stored size: 891 Bytes
Contents
# * George Moschovitis <gm@navel.gr> # (c) 2004-2005 Navel, all rights reserved. # $Id: context.rb 1 2005-04-11 11:04:30Z gmosx $ require 'test/unit' require 'test/unit/assertions' require 'rexml/document' require 'nitro/context' module Nitro # Override the default Request implementation # to include methods useful for testing. module Request end # Override the default Response implementation # to include methods useful for testing. module Response def status_ok? @status == 200 end def redirect? (300..399).include?(@status) end def redirect_url @response_headers['location'] end def response_cookie(name) return nil unless @response_cookies @response_cookies.find { |c| c.name == name } end end # Override the default Response implementation # to include methods useful for testing. class Context def session @session || @session = {} end end end
Version data entries
5 entries across 5 versions & 1 rubygems