Class: Luna::RSpec::Formatters::Base

Inherits:
RSpec::Core::Formatters::BaseTextFormatter
  • Object
show all
Defined in:
lib/luna/rspec/formatters/base.rb

Direct Known Subclasses

Checks, Documentation

Instance Method Summary collapse

Instance Method Details

#dump_summary(duration, total, failures, pending) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/luna/rspec/formatters/base.rb', line 22

def dump_summary(duration, total, failures, pending)
super
  Libnotify.new do |notify|
    notify.summary = "RSpec Test Results"
    notify.urgency = :critical
    notify.transient = true
    notify.append = true
    notify.timeout = 1
    notify.body = \
      "Passed: #{total - failures}, Failed: #{failures}, Pending: #{pending}"
  end.show!
end

#start(*args) ⇒ Object



12
13
14
15
# File 'lib/luna/rspec/formatters/base.rb', line 12

def start(*args)
  super
  output.puts
end

#start_dumpObject



17
18
19
20
# File 'lib/luna/rspec/formatters/base.rb', line 17

def start_dump
  super
  output.puts
end