Class: RSpec::Github::Formatter

Inherits:
Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/rspec/github/formatter.rb

Instance Method Summary collapse

Instance Method Details

#example_failed(failure) ⇒ Object



12
13
14
15
16
# File 'lib/rspec/github/formatter.rb', line 12

def example_failed(failure)
  notification = NotificationDecorator.new(failure)

  output.puts "\n::error file=#{notification.path},line=#{notification.line}::#{notification.annotation}"
end

#example_pending(pending) ⇒ Object



18
19
20
21
22
# File 'lib/rspec/github/formatter.rb', line 18

def example_pending(pending)
  notification = NotificationDecorator.new(pending)

  output.puts "\n::warning file=#{notification.path},line=#{notification.line}::#{notification.annotation}"
end

#seed(notification) ⇒ Object



24
25
26
27
28
# File 'lib/rspec/github/formatter.rb', line 24

def seed(notification)
  return unless notification.seed_used?

  output.puts notification.fully_formatted
end