jasonkarns
8/26/2015 - 8:23 PM

multiple_errors.rb

def matches?(page)
  @audit = @a11y_check.call Page.new page

  ::RSpec::Expectations::FailureAggregator.new(@audit.invocation, nil).aggregate do
    @audit.results.violations.each {|v| ::RSpec::Expectations.fail_with v.failure_message }
  end

  @audit.passed?
end