Class: Chaser::Reporter
- Inherits:
-
Object
- Object
- Chaser::Reporter
- Defined in:
- lib/zombie-chaser/chaser.rb
Instance Method Summary collapse
- #info(message) ⇒ Object
-
#initialize(interface) ⇒ Reporter
constructor
A new instance of Reporter.
- #interface_puts(*args) ⇒ Object
- #method_loaded(klass_name, method_name) ⇒ Object
- #no_surviving_mutant ⇒ Object
- #report_failure ⇒ Object
- #report_test_failures ⇒ Object
- #warning(message) ⇒ Object
Constructor Details
#initialize(interface) ⇒ Reporter
Returns a new instance of Reporter.
350 351 352 |
# File 'lib/zombie-chaser/chaser.rb', line 350 def initialize(interface) @interface = interface end |
Instance Method Details
#info(message) ⇒ Object
365 366 367 368 369 370 |
# File 'lib/zombie-chaser/chaser.rb', line 365 def info() interface_puts "*"*70, "*** #{}", "*"*70, "" end |
#interface_puts(*args) ⇒ Object
386 387 388 |
# File 'lib/zombie-chaser/chaser.rb', line 386 def interface_puts(*args) @interface.interface_puts(*args) end |
#method_loaded(klass_name, method_name) ⇒ Object
354 355 356 |
# File 'lib/zombie-chaser/chaser.rb', line 354 def method_loaded(klass_name, method_name) info "#{klass_name}\##{method_name} loaded" end |
#no_surviving_mutant ⇒ Object
378 379 380 |
# File 'lib/zombie-chaser/chaser.rb', line 378 def no_surviving_mutant interface_puts "The mutant didn't survive. Cool!\n\n" end |
#report_failure ⇒ Object
372 373 374 375 376 |
# File 'lib/zombie-chaser/chaser.rb', line 372 def report_failure interface_puts "", "The affected method didn't cause test failures.", "" end |
#report_test_failures ⇒ Object
382 383 384 |
# File 'lib/zombie-chaser/chaser.rb', line 382 def report_test_failures interface_puts "Tests failed -- this is good" if Chaser.debug end |
#warning(message) ⇒ Object
358 359 360 361 362 363 |
# File 'lib/zombie-chaser/chaser.rb', line 358 def warning() interface_puts "!" * 70, "!!! #{}", "!" * 70, "" end |