Class: Spec::Runner::Formatter::BaseTextFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/test_notifier/runner/spec.rb

Instance Method Summary collapse

Instance Method Details

#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/test_notifier/runner/spec.rb', line 7

def dump_summary(duration, example_count, failure_count, pending_count)
  dump_summary_original(duration, example_count, failure_count, pending_count)

  return if example_count.zero?

  stats = TestNotifier::Stats.new(:spec, {
    :count    => example_count,
    :failures => failure_count,
    :pending  => pending_count,
    :errors   => nil
  })

  TestNotifier.notify(:status => stats.status, :message => stats.message)
end

#dump_summary_originalObject


5
# File 'lib/test_notifier/runner/spec.rb', line 5

alias dump_summary_original dump_summary