diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 561a75da6..b04ed4b54 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,16 @@ +require 'simplecov' +require 'coveralls' + +# Generate coverage locally in html as well as in coveralls.io +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ + SimpleCov::Formatter::HTMLFormatter, + Coveralls::SimpleCov::Formatter +] +SimpleCov.start('rails') do + add_filter 'commonlib' + add_filter 'vendor/plugins' +end + # This file is copied to ~/spec when you run 'ruby script/generate rspec' # from the project root directory. ENV["RAILS_ENV"] = 'test' @@ -222,6 +235,9 @@ if $tempfilecount.nil? end def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET') self.original_process(action, parameters, session, flash, http_method) + # Don't try validating the admin interface. + # TODO: Make the admin interface valid html5 + return if @request.parameters["controller"] =~ /admin_/ # don't validate auto-generated HTML return if @request.query_parameters["action"] == "get_attachment_as_html" # XXX Is there a better way to check this than calling a private method? |