Object
# File lib/heckle.rb, line 705
705: def diff(original, mutation)
706: length = [original.split(/\n/).size, mutation.split(/\n/).size].max
707:
708: Tempfile.open("orig") do |a|
709: a.puts(original)
710: a.flush
711:
712: Tempfile.open("fail") do |b|
713: b.puts(mutation)
714: b.flush
715:
716: diff_flags = " "
717:
718: output = `#{Heckle::DIFF} -U #{length} --label original #{a.path} --label mutation #{b.path}`
719: puts output.sub(/^@@.*?\n/, '')
720: puts
721: end
722: end
723: end
# File lib/heckle.rb, line 725
725: def failure(original, failure)
726: self.diff original, failure
727: end
# File lib/heckle.rb, line 692
692: def info(message)
693: puts "*"*70
694: puts "*** #{message}"
695: puts "*"*70
696: puts
697: end
# File lib/heckle.rb, line 677
677: def method_loaded(klass_name, method_name, mutations_left)
678: info "#{klass_name}\##{method_name} loaded with #{mutations_left} possible mutations"
679: end
# File lib/heckle.rb, line 699
699: def no_failures
700: puts
701: puts "The following mutations didn't cause test failures:"
702: puts
703: end
# File lib/heckle.rb, line 673
673: def no_mutations(method_name)
674: warning "#{method_name} has a thick skin. There's nothing to heckle."
675: end
# File lib/heckle.rb, line 729
729: def no_surviving_mutants
730: puts "No mutants survived. Cool!\n\n"
731: end
# File lib/heckle.rb, line 681
681: def remaining_mutations(mutations_left)
682: puts "#{mutations_left} mutations remaining..."
683: end
# File lib/heckle.rb, line 733
733: def replacing(klass_name, method_name, original, src)
734: puts "Replacing #{klass_name}##{method_name} with:\n\n"
735: diff(original, src)
736: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.