Class: Test::Unit::UI::Console::ColorizedReadableDiffer

Inherits:
Diff::ReadableDiffer show all
Defined in:
lib/test/unit/ui/console/testrunner.rb,
lib/test/unit/ui/console/testrunner.rb,
lib/test/unit/ui/console/testrunner.rb,
lib/test/unit/ui/console/testrunner.rb

Instance Method Summary collapse

Methods inherited from Diff::ReadableDiffer

#diff

Constructor Details

#initialize(from, to, runner) ⇒ ColorizedReadableDiffer

Returns a new instance of ColorizedReadableDiffer



599
600
601
602
# File 'lib/test/unit/ui/console/testrunner.rb', line 599

def initialize(from, to, runner)
  @runner = runner
  super(from, to)
end

Instance Method Details

#need_diff?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


604
605
606
607
608
609
610
# File 'lib/test/unit/ui/console/testrunner.rb', line 604

def need_diff?(options={})
  return false if one_line_all_change?
  operations.each do |tag,|
    return true if [:replace, :equal].include?(tag)
  end
  false
end