Class: Spec::Runner::Reporter
- Inherits:
-
Object
- Object
- Spec::Runner::Reporter
- Defined in:
- lib/deep_test/spec/extensions/reporter.rb
Instance Method Summary collapse
- #example_finished(example, error = nil) ⇒ Object
- #failure(example, error) ⇒ Object (also: #example_failed)
Instance Method Details
#example_finished(example, error = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/deep_test/spec/extensions/reporter.rb', line 5 def example_finished(example, error=nil) @examples << example if error.nil? example_passed(example) elsif Spec::Example::ExamplePendingError === error example_pending(example, error.) else example_failed(example, error) end end |
#failure(example, error) ⇒ Object Also known as: example_failed
17 18 19 20 21 22 23 24 25 |
# File 'lib/deep_test/spec/extensions/reporter.rb', line 17 def failure(example, error) backtrace_tweaker.tweak_backtrace(error) example_name = "#{example.class.description} #{example.description}" failure = Failure.new(example, error) @failures << failure formatters.each do |f| f.example_failed(example, @failures.length, failure) end end |