Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added support for turning off verbose mode. To do so, add this to RAI…

…LS_ROOT/test/test_helper.rb:

    Html::Test::ValidateFilter.verbose = false
  • Loading branch information...
commit 6d00092a289fd9949f6e4887d38f381001c59108 1 parent 255803d
@rondevera authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/validate_filter.rb
View
6 lib/validate_filter.rb
@@ -6,6 +6,10 @@ class ValidateFilter
include ::Test::Unit::Assertions
include ::Html::Test::Assertions
+ # Whether to show output while running tests
+ @@verbose = true
+ cattr_accessor :verbose
+
def initialize(controller)
self.request = controller.request
self.response = controller.response
@@ -16,7 +20,7 @@ def initialize(controller)
def validate_page
url = request.request_uri
return if (!should_validate? || ValidateFilter.already_validated?(url))
- assert_validates(validators, response.body.strip, url, :verbose => true)
+ assert_validates(validators, response.body.strip, url, :verbose => verbose)
ValidateFilter.mark_url_validated(url)
end
Please sign in to comment.
Something went wrong with that request. Please try again.