Sha256: 2099b1d72f87b358c1a9d45339e5b8e923ed8b60e88d773a791a7a2cd8ea7e33

Contents?: true

Size: 625 Bytes

Versions: 15

Compression:

Stored size: 625 Bytes

Contents

require "test_notifier"
require "spec/runner/formatter/base_text_formatter"

class Spec::Runner::Formatter::BaseTextFormatter
  alias dump_summary_original dump_summary

  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
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
test_notifier-2.0.3 lib/test_notifier/runner/spec.rb
test_notifier-2.0.2 lib/test_notifier/runner/spec.rb
test_notifier-2.0.1 lib/test_notifier/runner/spec.rb
test_notifier-2.0.0 lib/test_notifier/runner/spec.rb
test_notifier-1.0.1 lib/test_notifier/runner/spec.rb
test_notifier-1.0.0 lib/test_notifier/runner/spec.rb
test_notifier-0.4.0 lib/test_notifier/runner/spec.rb
test_notifier-0.3.6 lib/test_notifier/runner/spec.rb
test_notifier-0.3.5 lib/test_notifier/runner/spec.rb
test_notifier-0.3.5.rc.4 lib/test_notifier/runner/spec.rb
test_notifier-0.3.5.rc.3 lib/test_notifier/runner/spec.rb
test_notifier-0.3.5.rc.2 lib/test_notifier/runner/spec.rb
test_notifier-0.3.5.rc.1 lib/test_notifier/runner/spec.rb
test_notifier-0.3.4 lib/test_notifier/runner/spec.rb
test_notifier-0.3.3 lib/test_notifier/runner/spec.rb