Class: Distributest::Formatter::BasicFormat

Inherits:
Spec::Runner::Formatter::BaseFormatter
  • Object
show all
Defined in:
lib/distributest/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output, errors, profile) ⇒ BasicFormat

Returns a new instance of BasicFormat.



7
8
9
10
11
# File 'lib/distributest/formatter.rb', line 7

def initialize(output, errors, profile)
  @output = output
  @errors = errors
  @profile = profile
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



5
6
7
# File 'lib/distributest/formatter.rb', line 5

def errors
  @errors
end

#outputObject

Returns the value of attribute output.



5
6
7
# File 'lib/distributest/formatter.rb', line 5

def output
  @output
end

Instance Method Details

#dump_failure(counter, failure) ⇒ Object



34
35
# File 'lib/distributest/formatter.rb', line 34

def dump_failure(counter, failure)
end

#dump_summary(duration, example, failure, pending) ⇒ Object



13
14
15
# File 'lib/distributest/formatter.rb', line 13

def dump_summary(duration, example, failure, pending)
  #hiding summary atm
end

#example_failed(example_proxy, counter, failure) ⇒ Object



26
27
28
# File 'lib/distributest/formatter.rb', line 26

def example_failed(example_proxy, counter, failure)
  errors << [failure.header.to_s, failure.exception.to_s, failure.exception.backtrace.join("\n")]
end

#example_passed(example) ⇒ Object



21
22
23
24
# File 'lib/distributest/formatter.rb', line 21

def example_passed(example)
  @profile << [example.description, Time.now - @time]
  output << '.'
end

#example_pending(example_proxy, message, deprecated_pending_location = nil) ⇒ Object



30
31
32
# File 'lib/distributest/formatter.rb', line 30

def example_pending(example_proxy, message, deprecated_pending_location = nil)
  output << '*'
end

#example_started(example) ⇒ Object



17
18
19
# File 'lib/distributest/formatter.rb', line 17

def example_started(example)
  @time = Time.now
end