Class: Minitest::NoAssertions::Reporter
- Inherits:
-
StatisticsReporter
- Object
- StatisticsReporter
- Minitest::NoAssertions::Reporter
- Defined in:
- lib/minitest/no_assertions.rb
Instance Method Summary collapse
-
#initialize(io = $stdout, options = {}) ⇒ Reporter
constructor
A new instance of Reporter.
- #record(result) ⇒ Object
Constructor Details
#initialize(io = $stdout, options = {}) ⇒ Reporter
Returns a new instance of Reporter.
17 18 19 |
# File 'lib/minitest/no_assertions.rb', line 17 def initialize(io = $stdout, = {}) super(io, ) end |
Instance Method Details
#record(result) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/minitest/no_assertions.rb', line 21 def record(result) if result.passed? && result.assertions.zero? msg = "%s has no assertions!! [%s]" % [result.location, result.source_location.join(":")] warn(msg) end end |