Class: Minitest::Reporters::RedisReporter::Base
- Inherits:
-
BaseReporter
- Object
- BaseReporter
- Minitest::Reporters::RedisReporter::Base
- Defined in:
- lib/minitest/reporters/redis_reporter.rb
Instance Method Summary collapse
- #completed? ⇒ Boolean
- #error_reports ⇒ Object
-
#initialize(redis:, build_id:, **options) ⇒ Base
constructor
A new instance of Base.
- #processed ⇒ Object
- #total ⇒ Object
Constructor Details
#initialize(redis:, build_id:, **options) ⇒ Base
Returns a new instance of Base.
90 91 92 93 94 |
# File 'lib/minitest/reporters/redis_reporter.rb', line 90 def initialize(redis:, build_id:, **) @redis = redis @key = "build:#{build_id}" super() end |
Instance Method Details
#completed? ⇒ Boolean
104 105 106 |
# File 'lib/minitest/reporters/redis_reporter.rb', line 104 def completed? total > 0 && total == processed end |
#error_reports ⇒ Object
108 109 110 |
# File 'lib/minitest/reporters/redis_reporter.rb', line 108 def error_reports redis.hgetall(key('error-reports')).sort_by(&:first).map { |k, v| Error.load(v) } end |
#processed ⇒ Object
100 101 102 |
# File 'lib/minitest/reporters/redis_reporter.rb', line 100 def processed redis.scard(key('processed')).to_i end |
#total ⇒ Object
96 97 98 |
# File 'lib/minitest/reporters/redis_reporter.rb', line 96 def total redis.get(key('total')).to_i end |