knapsack_pro 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2613a884f776c2208358e8118f866e2c05e979ce
|
4
|
+
data.tar.gz: d34a6924e6f52598b2a6dd19d6573a479f0c68aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7e78a1356322c7a083134bc8b2b8e52e3f0f0177375c59c9a0010fb32a64cf1afce7566fbabf500429d8b69e93c12796438a711afe2d9c1f230f98a9348262
|
7
|
+
data.tar.gz: 90093af068fe34b8a808e7474365617e5f793387732e83e12282b9df08fba57ce8261745c703f39752f69bb0397ee7cf84f158596b10e90c2adacf7192c67cd6
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO
|
4
4
|
|
5
|
+
### 0.7.2
|
6
|
+
|
7
|
+
* Preserve cucumber latest error message with exit code to fix problem with false positive cucumber failed tests
|
8
|
+
|
9
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/pull/10
|
10
|
+
|
11
|
+
https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v0.7.1...v0.7.2
|
12
|
+
|
5
13
|
### 0.7.1
|
6
14
|
|
7
15
|
* Don't fail when there are no tests to run on a node
|
@@ -41,9 +41,16 @@ module KnapsackPro
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
def bind_save_report
|
44
|
+
def bind_save_report(latest_error = nil)
|
45
45
|
::Kernel.at_exit do
|
46
|
+
# $! is latest error message
|
47
|
+
latest_error = (latest_error || $!)
|
48
|
+
exit_status = latest_error.status if latest_error.is_a?(SystemExit)
|
49
|
+
#require 'pry'; binding.pry
|
50
|
+
# saving report makes API call which changes exit status
|
51
|
+
# from cucumber so we need to preserve cucumber exit status
|
46
52
|
KnapsackPro::Report.save
|
53
|
+
::Kernel.exit exit_status if exit_status
|
47
54
|
end
|
48
55
|
end
|
49
56
|
|
data/lib/knapsack_pro/version.rb
CHANGED
@@ -129,6 +129,21 @@ describe KnapsackPro::Adapters::CucumberAdapter do
|
|
129
129
|
|
130
130
|
subject.bind_save_report
|
131
131
|
end
|
132
|
+
|
133
|
+
context 'when cucumber tests failed' do
|
134
|
+
let(:exit_status) { double }
|
135
|
+
let(:latest_error) { instance_double(SystemExit, status: exit_status) }
|
136
|
+
|
137
|
+
it 'preserves cucumber latest error message exit status' do
|
138
|
+
expect(::Kernel).to receive(:at_exit).and_yield
|
139
|
+
|
140
|
+
expect(latest_error).to receive(:is_a?).with(SystemExit).and_return(true)
|
141
|
+
expect(KnapsackPro::Report).to receive(:save)
|
142
|
+
expect(::Kernel).to receive(:exit).with(exit_status)
|
143
|
+
|
144
|
+
subject.bind_save_report(latest_error)
|
145
|
+
end
|
146
|
+
end
|
132
147
|
end
|
133
148
|
end
|
134
149
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knapsack_pro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ArturT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|