Skip to content

Instantly share code, notes, and snippets.

@JonnieCache
Created April 8, 2010 22:01
Show Gist options
  • Select an option

  • Save JonnieCache/360610 to your computer and use it in GitHub Desktop.

Select an option

Save JonnieCache/360610 to your computer and use it in GitHub Desktop.
class ActionController::TestCase
def process_with_auto_validate(action, parameters = nil, session = nil, flash = nil, http_method = 'GET')
response = process_without_auto_validate(action,parameters,session,flash,http_method)
assert_xhtml_strict response.body unless response.redirect? or @request.xhr? or @response.content_type != 'text/html'
response
end
alias_method_chain :process, :auto_validate
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment