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,
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



497
498
499
500
# File 'lib/test/unit/ui/console/testrunner.rb', line 497

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

Instance Method Details

#need_diff?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


502
503
504
505
506
507
# File 'lib/test/unit/ui/console/testrunner.rb', line 502

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