Skip to content

Commit 14933b0

Browse files
authored
unify verbose formatter with other loggers (grosser#927)
* typo * unify verbose formatter with other loggers
1 parent 7291dfd commit 14933b0

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

Readme.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Add the following to your `.rspec_parallel` (or `.rspec`) :
151151
RSpec: FailuresLogger
152152
-----------------------
153153

154-
Produce pastable command-line snippets for each failed example. For example:
154+
Produce pasteable command-line snippets for each failed example. For example:
155155

156156
```bash
157157
rspec /path/to/my_spec.rb:123 # should do something
@@ -164,6 +164,24 @@ Add to `.rspec_parallel` or use as CLI flag:
164164

165165
(Not needed to retry failures, for that pass [--only-failures](https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures) to rspec)
166166

167+
168+
RSpec: VerboseLogger
169+
-----------------------
170+
171+
Prints a single line for starting and finishing each example, to see what is currently running in each process.
172+
173+
```
174+
# PID, parallel process number, spec status, example description
175+
[14403] [2] [STARTED] Foo foo
176+
[14402] [1] [STARTED] Bar bar
177+
[14402] [1] [PASSED] Bar bar
178+
```
179+
180+
Add to `.rspec_parallel` or use as CLI flag:
181+
182+
--format ParallelTests::RSpec::VerboseLogger
183+
184+
167185
Cucumber: FailuresLogger
168186
-----------------------
169187

@@ -183,22 +201,6 @@ To rerun failures:
183201

184202
cucumber @tmp/cucumber_failures.log
185203

186-
Formatters
187-
==========
188-
189-
RSpec: VerboseFormatter
190-
191-
Output the RSpec PID, parallel process number, spec status, and the full
192-
example description. The formatter outputs one line when starting an example
193-
and then again when finishing. Use like the RSpec documentation but plays
194-
nicely with parallel processes.
195-
196-
Usage:
197-
198-
```console
199-
$ parallel_rspec -- --format ParallelTests::RSpec::VerboseFormatter --
200-
```
201-
202204
Setup for non-rails
203205
===================
204206

lib/parallel_tests/rspec/verbose_formatter.rb renamed to lib/parallel_tests/rspec/verbose_logger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'rspec/core/formatters/base_text_formatter'
44
require 'parallel_tests/rspec/runner'
55

6-
class ParallelTests::RSpec::VerboseFormatter < RSpec::Core::Formatters::BaseTextFormatter
6+
class ParallelTests::RSpec::VerboseLogger < RSpec::Core::Formatters::BaseTextFormatter
77
RSpec::Core::Formatters.register(
88
self,
99
:example_group_started,

spec/parallel_tests/rspec/verbose_formatter_spec.rb renamed to spec/parallel_tests/rspec/verbose_logger_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
describe ParallelTests::RSpec::VerboseFormatter do
5+
describe ParallelTests::RSpec::VerboseLogger do
66
def run(command)
77
result = IO.popen(command, err: [:child, :out], &:read)
88
raise "FAILED: #{result}" unless $?.success?
@@ -39,7 +39,7 @@ def run(command)
3939
"#{repo_root}/bin/parallel_rspec",
4040
"-n", "2",
4141
"--",
42-
"--format", "ParallelTests::RSpec::VerboseFormatter",
42+
"--format", "ParallelTests::RSpec::VerboseLogger",
4343
"--"
4444
]
4545

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
require 'parallel_tests/test/runtime_logger'
99
require 'parallel_tests/rspec/runtime_logger'
1010
require 'parallel_tests/rspec/summary_logger'
11-
require 'parallel_tests/rspec/verbose_formatter'
11+
require 'parallel_tests/rspec/verbose_logger'
1212

1313
String.class_eval do
1414
def strip_heredoc

0 commit comments

Comments
 (0)