Sha256: 06589d7dcc18a068b09b2c81f29f70a78840228822906d46c9fbfbcfc9ee352c
Contents?: true
Size: 821 Bytes
Versions: 9
Compression:
Stored size: 821 Bytes
Contents
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 Context implementation # to include methods useful for testing. class Context def session @session || @session = {} end end end # * George Moschovitis <gm@navel.gr>
Version data entries
9 entries across 9 versions & 1 rubygems