summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-05 15:50:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-05 17:42:35 +0900
commit19f91f788016ef98e30ead047e53edeb7a5f2566 (patch)
tree7aacb2d3323a04d67cb1855fb74915b4086f3589 /spec
parentdfb3322d27aa05f506818209ab6a10a77221b86d (diff)
`DottedFormatter#finish` consistency
Rmoved optional parameter `printed_exceptions`, and clear `exceptions` just after printing each exception, instead.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2649
Diffstat (limited to 'spec')
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/multi.rb4
-rw-r--r--spec/mspec/lib/mspec/runner/formatters/spinner.rb7
2 files changed, 1 insertions, 10 deletions
diff --git a/spec/mspec/lib/mspec/runner/formatters/multi.rb b/spec/mspec/lib/mspec/runner/formatters/multi.rb
index 5932eeef62..085f961be8 100644
--- a/spec/mspec/lib/mspec/runner/formatters/multi.rb
+++ b/spec/mspec/lib/mspec/runner/formatters/multi.rb
@@ -33,8 +33,4 @@ class MultiFormatter < SpinnerFormatter
def print_exception(exc, count)
print "\n#{count})\n#{exc}\n"
end
-
- def finish
- super(false)
- end
end
diff --git a/spec/mspec/lib/mspec/runner/formatters/spinner.rb b/spec/mspec/lib/mspec/runner/formatters/spinner.rb
index 89791b687f..f9101aece3 100644
--- a/spec/mspec/lib/mspec/runner/formatters/spinner.rb
+++ b/spec/mspec/lib/mspec/runner/formatters/spinner.rb
@@ -102,16 +102,11 @@ class SpinnerFormatter < DottedFormatter
clear_progress_line
print_exception(exception, @count)
+ exceptions.clear
end
# Callback for the MSpec :after event. Updates the spinner.
def after(state = nil)
print progress_line
end
-
- def finish(printed_exceptions = true)
- # We already printed the exceptions
- @exceptions = [] if printed_exceptions
- super()
- end
end