gurke 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/gurke/reporters/team_city_reporter.rb +1 -1
- data/lib/gurke/version.rb +1 -1
- data/spec/gurke/reporters/team_city_reporter_spec.rb +36 -13
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f0e20c2294765e444f6d57c93c0f396aacca045a6e68d38913841d9c10ac455
|
4
|
+
data.tar.gz: f691ffa3fe1ee9675db5e030b30cab01d0e79444d4865eb42e101278115b7017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5acfcc8dc29a615b5d522ad375d13aa782663c8a1f5e5ccb7385e0416a617afab642911726a8ea4dbe6234a14b15d0dceecfc45e8a527e4537ac06b45570c7f
|
7
|
+
data.tar.gz: 7b236cecf9842f9905b9160d65ee7641ecdb88004700de5766f88de1ac9c6b63e0e7cbecfef14153b80c8ef6a5add5c144cf47e6d4a41cfe6bdce0ca1e3a7401
|
data/CHANGELOG.md
CHANGED
data/lib/gurke/version.rb
CHANGED
@@ -8,7 +8,8 @@ require 'spec_helper'
|
|
8
8
|
RSpec.describe Gurke::Reporters::TeamCityReporter do
|
9
9
|
let(:output) { StringIO.new }
|
10
10
|
let(:reporter) { described_class.new(output) }
|
11
|
-
|
11
|
+
|
12
|
+
subject { output.string.scan(/##teamcity\[.*\]/) }
|
12
13
|
|
13
14
|
describe '#before_feature' do
|
14
15
|
let(:feature) { double('feature') }
|
@@ -25,9 +26,9 @@ RSpec.describe Gurke::Reporters::TeamCityReporter do
|
|
25
26
|
subject { reporter.before_feature(feature); super() }
|
26
27
|
|
27
28
|
it 'include a testSuiteStarted command' do
|
28
|
-
is_expected.to
|
29
|
-
##teamcity[testSuiteStarted name='Demo feature']
|
30
|
-
|
29
|
+
is_expected.to eq [
|
30
|
+
"##teamcity[testSuiteStarted name='Demo feature']"
|
31
|
+
]
|
31
32
|
end
|
32
33
|
end
|
33
34
|
|
@@ -44,9 +45,9 @@ RSpec.describe Gurke::Reporters::TeamCityReporter do
|
|
44
45
|
subject { reporter.before_scenario(scenario); super() }
|
45
46
|
|
46
47
|
it do
|
47
|
-
is_expected.to
|
48
|
-
##teamcity[testStarted name='Running the scenario']
|
49
|
-
|
48
|
+
is_expected.to eq [
|
49
|
+
"##teamcity[testStarted name='Running the scenario']"
|
50
|
+
]
|
50
51
|
end
|
51
52
|
end
|
52
53
|
|
@@ -64,9 +65,31 @@ RSpec.describe Gurke::Reporters::TeamCityReporter do
|
|
64
65
|
subject { reporter.after_scenario(scenario); super() }
|
65
66
|
|
66
67
|
it do
|
67
|
-
is_expected.to
|
68
|
-
##teamcity[testFinished name='Running the scenario']
|
69
|
-
|
68
|
+
is_expected.to eq [
|
69
|
+
"##teamcity[testFinished name='Running the scenario']"
|
70
|
+
]
|
71
|
+
end
|
72
|
+
|
73
|
+
context '<failed>' do
|
74
|
+
let(:exception) do
|
75
|
+
begin
|
76
|
+
raise RuntimeError.new
|
77
|
+
rescue RuntimeError => e
|
78
|
+
e
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
before do
|
83
|
+
allow(scenario).to receive(:failed?).and_return(true)
|
84
|
+
allow(scenario).to receive(:exception).and_return(exception)
|
85
|
+
end
|
86
|
+
|
87
|
+
it do
|
88
|
+
is_expected.to match [
|
89
|
+
match(/##teamcity\[testFailed name='.*' message='.*' backtrace='.*'\]/),
|
90
|
+
"##teamcity[testFinished name='Running the scenario']"
|
91
|
+
]
|
92
|
+
end
|
70
93
|
end
|
71
94
|
end
|
72
95
|
|
@@ -80,9 +103,9 @@ RSpec.describe Gurke::Reporters::TeamCityReporter do
|
|
80
103
|
subject { reporter.after_feature(feature); super() }
|
81
104
|
|
82
105
|
it do
|
83
|
-
is_expected.to
|
84
|
-
##teamcity[testSuiteFinished name='Demo feature']
|
85
|
-
|
106
|
+
is_expected.to eq [
|
107
|
+
"##teamcity[testSuiteFinished name='Demo feature']"
|
108
|
+
]
|
86
109
|
end
|
87
110
|
end
|
88
111
|
end
|