Sha256: 8645db5e3553ecbf7ee1883b5b502419fefce7d8026c219fde1e879a98739d33

Contents?: true

Size: 627 Bytes

Versions: 44

Compression:

Stored size: 627 Bytes

Contents

module Recog
class Verifier
  attr_reader :fingerprints, :reporter

  def initialize(fingerprints, reporter)
    @fingerprints = fingerprints
    @reporter = reporter
  end

  def verify_tests
    reporter.report(fingerprints.count) do
      fingerprints.each do |fp|
        reporter.print_name fp

        fp.verify_tests do |status, message|
          case status
          when :warn
            reporter.warning "WARN: #{message}"
          when :fail
            reporter.failure "FAIL: #{message}"
          when :success
            reporter.success(message)
          end

        end

      end
    end
  end
end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
recog-1.0.3 lib/recog/verifier.rb
recog-1.0.2 lib/recog/verifier.rb
recog-1.0.1 lib/recog/verifier.rb
recog-1.0.0 lib/recog/verifier.rb