cucumber-formatters 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cucumber/formatter/rerun_dump.rb +36 -0
- data/lib/cucumber/formatters.rb +6 -0
- data/spec/rerun_dump_spec.rb +7 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed08aa8fdea015bad571456b7bb8c2f8d1778c09
|
4
|
+
data.tar.gz: 15e4df8505a7092056ab266adf461980bd8cb88c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b5b10dba0e0a8a0db97a5cb24d92ec0cb8731e23e602a9ab9314ba431150452e69cfa9881553e4526f09ca066f277c9e87616ac8b139a06a783a13679b0fa4
|
7
|
+
data.tar.gz: 21b1bf6df6b2871038ed4d1e6d0d13884d5a06a6c1ead8861144e41eb524407e137f82f03e2cd4b07c37cde039f677223255216b15614ffc171acf87d53c1c00
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'cucumber/formatter/io'
|
2
|
+
|
3
|
+
module Cucumber
|
4
|
+
module Formatter
|
5
|
+
# Works like rerun but just outputs file location and line number
|
6
|
+
# Each new test is output to a new line
|
7
|
+
class RerunDump
|
8
|
+
include Cucumber::Formatter::Io
|
9
|
+
|
10
|
+
def initialize(_runtime, path_or_io, options)
|
11
|
+
@io = ensure_io(path_or_io)
|
12
|
+
@results = []
|
13
|
+
@options = options
|
14
|
+
end
|
15
|
+
|
16
|
+
def after_test_case(test_case, _result)
|
17
|
+
@results << [test_case.location.file, test_case.location.line]
|
18
|
+
end
|
19
|
+
|
20
|
+
def done
|
21
|
+
return if @results.empty?
|
22
|
+
@io.print file_failures.join("\n")
|
23
|
+
end
|
24
|
+
|
25
|
+
[:before_test_case, :before_test_step, :after_test_step].each do |method|
|
26
|
+
define_method(method) { |*| }
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def file_failures
|
32
|
+
@results.map { |file, lines| [file, lines].join(':') }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
data/lib/cucumber/formatters.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'cucumber/formatter/failures'
|
2
|
+
require 'cucumber/formatter/rerun_dump'
|
2
3
|
require 'cucumber/formatter/simplecsv'
|
3
4
|
require 'cucumber/formatter/simpledoc'
|
4
5
|
require 'cucumber/cli/main'
|
@@ -10,6 +11,11 @@ Cucumber::Cli::Options::BUILTIN_FORMATS['failures'] = [
|
|
10
11
|
'Outputs scenario information and stack trace when a test fails'
|
11
12
|
]
|
12
13
|
|
14
|
+
Cucumber::Cli::Options::BUILTIN_FORMATS['rerundump'] = [
|
15
|
+
'Cucumber::Formatter::RerunDump',
|
16
|
+
'Outputs scenario file and line number on new lines. For use with --dry-run'
|
17
|
+
]
|
18
|
+
|
13
19
|
Cucumber::Cli::Options::BUILTIN_FORMATS['simpledoc'] = [
|
14
20
|
'Cucumber::Formatter::SimpleDoc',
|
15
21
|
'Outputs feature, scenario and line number'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-formatters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Slaughter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -117,10 +117,12 @@ files:
|
|
117
117
|
- LICENSE
|
118
118
|
- README.md
|
119
119
|
- lib/cucumber/formatter/failures.rb
|
120
|
+
- lib/cucumber/formatter/rerun_dump.rb
|
120
121
|
- lib/cucumber/formatter/simplecsv.rb
|
121
122
|
- lib/cucumber/formatter/simpledoc.rb
|
122
123
|
- lib/cucumber/formatters.rb
|
123
124
|
- spec/failures_spec.rb
|
125
|
+
- spec/rerun_dump_spec.rb
|
124
126
|
- spec/simplecsv_spec.rb
|
125
127
|
- spec/simpledoc_spec.rb
|
126
128
|
- spec/spec_helper.rb
|
@@ -150,6 +152,7 @@ specification_version: 4
|
|
150
152
|
summary: A helpful bunch of formatters
|
151
153
|
test_files:
|
152
154
|
- spec/failures_spec.rb
|
155
|
+
- spec/rerun_dump_spec.rb
|
153
156
|
- spec/simplecsv_spec.rb
|
154
157
|
- spec/simpledoc_spec.rb
|
155
158
|
- spec/spec_helper.rb
|