encrypted

encrypted() Instance Public methods Returns a jar that'll automatically encrypt cookie values before sending them to the client and will decrypt them for read. If the cookie was tampered with by the user (or a 3rd party), nil will be returned. If secrets.secret_key_base and secrets.secret_token (deprecated) are both set, legacy cookies signed with the old key generator will be transparently upgraded. This jar requires that you set a suitable secret for the verification on your app'

call

call(env) Instance Public methods

new

new(app) Class Public methods

before

before(*args, &block) Class Public methods

after

after(*args, &block) Class Public methods

html_document

html_document() Instance Public methods

find_tag

find_tag(conditions) Instance Public methods

find_all_tag

find_all_tag(conditions) Instance Public methods

assert_tag

assert_tag(*opts) Instance Public methods Asserts that there is a tag/node/element in the body of the response that meets all of the given conditions. The conditions parameter must be a hash of any of the following keys (all are optional): :tag: the node type must match the corresponding value :attributes: a hash. The node's attributes must match the corresponding values in the hash. :parent: a hash. The node's parent must match the corresponding hash. :child: a hash. At lea

assert_no_tag

assert_no_tag(*opts) Instance Public methods Identical to assert_tag, but asserts that a matching tag does not exist. (See assert_tag for a full discussion of the syntax.) # Assert that there is not a "div" containing a "p" assert_no_tag tag: "div", descendant: { tag: "p" } # Assert that an unordered list is empty assert_no_tag tag: "ul", descendant: { tag: "li" } # Assert that there is not a "p" tag with between 1 to 3 "img" tags # as immediate children assert_no_tag tag: "p",