cucumber-formatter-dots 1.0.4 → 1.1.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/dots-formatter-go/dots-formatter-go-darwin-386 +0 -0
- data/dots-formatter-go/dots-formatter-go-darwin-amd64 +0 -0
- data/dots-formatter-go/dots-formatter-go-freebsd-386 +0 -0
- data/dots-formatter-go/dots-formatter-go-freebsd-amd64 +0 -0
- data/dots-formatter-go/dots-formatter-go-freebsd-arm +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-386 +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-amd64 +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-arm +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-mips +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-mips64 +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-mips64le +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-mipsle +0 -0
- data/dots-formatter-go/dots-formatter-go-linux-s390x +0 -0
- data/dots-formatter-go/dots-formatter-go-netbsd-386 +0 -0
- data/dots-formatter-go/dots-formatter-go-netbsd-amd64 +0 -0
- data/dots-formatter-go/dots-formatter-go-netbsd-arm +0 -0
- data/dots-formatter-go/dots-formatter-go-openbsd-386 +0 -0
- data/dots-formatter-go/dots-formatter-go-openbsd-amd64 +0 -0
- data/dots-formatter-go/dots-formatter-go-windows-386.exe +0 -0
- data/dots-formatter-go/dots-formatter-go-windows-amd64.exe +0 -0
- data/lib/cucumber/formatter/dots.rb +19 -10
- data/spec/cucumber/formatter/dots_spec.rb +23 -14
- data/spec/cucumber/formatter/expected_output.ansi +1 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a01785128135a72a372668ed75e8d563f9a1f1e5e64514f528f9612017bd367
|
4
|
+
data.tar.gz: c4b2e183db28eca17302249e5bcac7750d50a732f3273459e93ba69af7e19aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '038e9ef779fb69e9847ac7766c7f2b43f80635f15262fbadefbc11273c85ddb90439d8681a2b8439eaf4b511ab1938f321eb22a4eaacccdf2add33f1ea4f5c23'
|
7
|
+
data.tar.gz: f5f6f121775ff4331bd6b3b961f44cde4d7e51209309864b19bb43b709eb73ec3634eb2794326202bb8df3b988cca0bd54ab11ae1ed66438c09624252fede00f
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -18,22 +18,31 @@ module Cucumber
|
|
18
18
|
root = File.expand_path(File.dirname(__FILE__) + '/../../..')
|
19
19
|
@exe = C21e::ExeFile.new("#{root}/dots-formatter-go/dots-formatter-go-{{.OS}}-{{.Arch}}{{.Ext}}").target_file
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def on_test_run_started(event)
|
23
|
-
@stdin, stdout,
|
23
|
+
@stdin, stdout, _stderr, @wait_thread = Open3.popen3(@exe)
|
24
24
|
@out_thread = Thread.new do
|
25
|
-
stdout.each_byte {|b| @out_stream << b.chr}
|
25
|
+
stdout.each_byte { |b| @out_stream << b.chr }
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
def on_test_step_finished(event)
|
30
|
-
wrapper =
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
30
|
+
wrapper = event.test_step.hook? ?
|
31
|
+
Cucumber::Messages::Wrapper.new(
|
32
|
+
testHookFinished: Cucumber::Messages::TestHookFinished.new(
|
33
|
+
testResult: Cucumber::Messages::TestResult.new(
|
34
|
+
status: event.result.to_sym.upcase
|
35
|
+
)
|
36
|
+
)
|
37
|
+
)
|
38
|
+
:
|
39
|
+
Cucumber::Messages::Wrapper.new(
|
40
|
+
testStepFinished: Cucumber::Messages::TestStepFinished.new(
|
41
|
+
testResult: Cucumber::Messages::TestResult.new(
|
42
|
+
status: event.result.to_sym.upcase
|
43
|
+
)
|
44
|
+
)
|
45
|
+
)
|
37
46
|
bytes = Cucumber::Messages::Wrapper.encode(wrapper)
|
38
47
|
encode_varint(@stdin, bytes.unpack('C*').length)
|
39
48
|
@stdin.write(bytes)
|
@@ -21,27 +21,36 @@ module Cucumber
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
TestStep = Struct.new(:hook?)
|
25
|
+
TestStepFinished = Struct.new(:result, :test_step)
|
26
|
+
|
26
27
|
describe Dots do
|
28
|
+
def hook_finished_event(status)
|
29
|
+
TestStepFinished.new(status, TestStep.new(true))
|
30
|
+
end
|
31
|
+
|
32
|
+
def gherkin_step_finished_event(status)
|
33
|
+
TestStepFinished.new(status, TestStep.new(false))
|
34
|
+
end
|
35
|
+
|
27
36
|
it 'prints coloured dots' do
|
28
37
|
config = StubConfig.new
|
29
|
-
|
30
|
-
|
38
|
+
Dots.new(config)
|
39
|
+
|
31
40
|
config.test_run_started({})
|
32
|
-
config.test_step_finished(
|
33
|
-
config.test_step_finished(
|
34
|
-
config.test_step_finished(
|
35
|
-
config.test_step_finished(
|
36
|
-
config.test_step_finished(
|
37
|
-
config.test_step_finished(
|
41
|
+
config.test_step_finished(hook_finished_event('failed'))
|
42
|
+
config.test_step_finished(gherkin_step_finished_event('failed'))
|
43
|
+
config.test_step_finished(gherkin_step_finished_event('skipped'))
|
44
|
+
config.test_step_finished(gherkin_step_finished_event('undefined'))
|
45
|
+
config.test_step_finished(gherkin_step_finished_event('ambiguous'))
|
46
|
+
config.test_step_finished(gherkin_step_finished_event('passed'))
|
47
|
+
config.test_step_finished(gherkin_step_finished_event('pending'))
|
38
48
|
config.test_run_finished({})
|
39
|
-
|
49
|
+
|
40
50
|
config.out_stream.rewind
|
41
51
|
out = config.out_stream.read
|
42
|
-
|
43
|
-
|
44
|
-
expect(out).to eq("\e[31mF\e[0m\e[36m-\e[0m\e[33mU\e[0m\e[35mA\e[0m\e[32m.\e[0m\e[33mP\e[0m\n")
|
52
|
+
|
53
|
+
expect(out).to eq(File.read(File.dirname(__FILE__) + '/expected_output.ansi'))
|
45
54
|
end
|
46
55
|
end
|
47
56
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
[31mH[0m[31mF[0m[36m-[0m[33mU[0m[35mA[0m[32m.[0m[33mP[0m
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-formatter-dots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wynne
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- spec/capture_warnings.rb
|
113
113
|
- spec/coverage.rb
|
114
114
|
- spec/cucumber/formatter/dots_spec.rb
|
115
|
+
- spec/cucumber/formatter/expected_output.ansi
|
115
116
|
homepage: https://github.com/cucumber/dots-formatter-ruby
|
116
117
|
licenses:
|
117
118
|
- MIT
|
@@ -133,11 +134,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
134
|
version: '0'
|
134
135
|
requirements: []
|
135
136
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.7.
|
137
|
+
rubygems_version: 2.7.4
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
|
-
summary: cucumber-formatter-dots-1.0
|
140
|
+
summary: cucumber-formatter-dots-1.1.0
|
140
141
|
test_files:
|
141
142
|
- spec/capture_warnings.rb
|
142
143
|
- spec/coverage.rb
|
143
144
|
- spec/cucumber/formatter/dots_spec.rb
|
145
|
+
- spec/cucumber/formatter/expected_output.ansi
|