Class: Chaser::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/zombie-chaser/chaser.rb

Instance Method Summary collapse

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(message)
  interface_puts "*"*70,
                 "***  #{message}",
                 "*"*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_mutantObject



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_failureObject



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_failuresObject



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(message)
  interface_puts "!" * 70,
                 "!!! #{message}",
                 "!" * 70,
                 ""
end