onlyoffice_tcm_helper 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onlyoffice_tcm_helper/helpers/pending_helper.rb +15 -8
- data/lib/onlyoffice_tcm_helper/models/pseudo_example_aborted.rb +2 -2
- data/lib/onlyoffice_tcm_helper/models/pseudo_example_pending_but_passed.rb +6 -0
- data/lib/onlyoffice_tcm_helper/version.rb +1 -1
- data/lib/onlyoffice_tcm_helper.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea10f0b9531302112fffc41d4272bd9cab11c3b13f2429d712db6f8b5559cb1a
|
4
|
+
data.tar.gz: 84a021f6ea028ec977a406eee88cba071d68ef2411f32e8445343cf833740a49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1cc01a8368b5a4b508104ae401faedc3fd53620976fb1c47a6da9b72b220566ca0a8d739d864daab5523a7445c5808583e3d5a05b7ef1c3966f4b44bd517cd
|
7
|
+
data.tar.gz: 58687f6517e8875e051466e26402f8ef4ffbb38bd2a2bc371eb31275d1e02e8c0336a9223805e17db40ac627ab12423e411e89ed83f4647dcd9f3e6039ef56ce
|
@@ -3,20 +3,26 @@
|
|
3
3
|
module OnlyofficeTcmHelper
|
4
4
|
# module with methods for parsing test results
|
5
5
|
module PendingHelper
|
6
|
+
# @return [String] Message if pending passed
|
7
|
+
def passed_pending_message
|
8
|
+
'Expected example to fail since it is pending, but it passed'
|
9
|
+
end
|
10
|
+
|
6
11
|
# Check if pending example passed
|
7
12
|
# This situation is incorrect - if pending is passing for some reason
|
8
13
|
# This pending comment should be removed and investigate
|
9
|
-
# @param [String]
|
14
|
+
# @param [String] exception text of example
|
10
15
|
# @return [Boolean]
|
11
|
-
def pending_passed?(
|
12
|
-
|
16
|
+
def pending_passed?(exception)
|
17
|
+
exception.start_with?(passed_pending_message)
|
13
18
|
end
|
14
19
|
|
15
20
|
# Get pending status by it's comment
|
16
|
-
# @param [String]
|
21
|
+
# @param [String] exception text of example
|
17
22
|
# @return [Symbol] `:failed` or `:pending`
|
18
|
-
def pending_status(
|
19
|
-
if pending_passed?(
|
23
|
+
def pending_status(exception)
|
24
|
+
if pending_passed?(exception)
|
25
|
+
@comment = "#{passed_pending_message}\nOriginal Pending:\n#{@comment}"
|
20
26
|
:failed
|
21
27
|
else
|
22
28
|
:pending
|
@@ -25,11 +31,12 @@ module OnlyofficeTcmHelper
|
|
25
31
|
|
26
32
|
# Handle pending information
|
27
33
|
# @param [RSpec::Core::Example] example to handle
|
28
|
-
# @
|
34
|
+
# @return [Symbol] status of pending
|
29
35
|
def handle_pending(example)
|
30
36
|
@comment = example.execution_result.pending_message
|
37
|
+
exception = example.exception.to_s
|
31
38
|
|
32
|
-
pending_status(
|
39
|
+
pending_status(exception)
|
33
40
|
end
|
34
41
|
end
|
35
42
|
end
|
@@ -4,8 +4,8 @@
|
|
4
4
|
class PseudoExampleAborted < PseudoExample
|
5
5
|
# @return [String] exception string
|
6
6
|
def exception
|
7
|
-
"undefined local variable or method `tasdasdrue' "\
|
8
|
-
'for #<RSpec::ExampleGroups::OnlyofficeTcmHelper::'\
|
7
|
+
"undefined local variable or method `tasdasdrue' " \
|
8
|
+
'for #<RSpec::ExampleGroups::OnlyofficeTcmHelper::' \
|
9
9
|
'StatusChecks:0x000000020b8400>'
|
10
10
|
end
|
11
11
|
end
|
@@ -10,7 +10,13 @@ class PseudoExamplePendingButPassed < PseudoExample
|
|
10
10
|
"Expected pending 'Fake failure' to fail. No error was raised.")
|
11
11
|
end
|
12
12
|
|
13
|
+
# @return [True] this example always pending
|
13
14
|
def pending?
|
14
15
|
true
|
15
16
|
end
|
17
|
+
|
18
|
+
# @return [String] exception data
|
19
|
+
def exception
|
20
|
+
'Expected example to fail since it is pending, but it passed.'
|
21
|
+
end
|
16
22
|
end
|
@@ -69,7 +69,7 @@ module OnlyofficeTcmHelper
|
|
69
69
|
comment = "\n#{example.exception.to_s
|
70
70
|
.gsub('got:', "got:\n")
|
71
71
|
.gsub('expected:', "expected:\n")
|
72
|
-
.gsub('to return ', "to return:\n")}\n"\
|
72
|
+
.gsub('to return ', "to return:\n")}\n" \
|
73
73
|
"In line:\n#{RspecHelper.find_failed_line(example)}"
|
74
74
|
@comment = comment
|
75
75
|
:failed
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onlyoffice_tcm_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ONLYOFFICE
|
@@ -10,22 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: onlyoffice_file_helper
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - "
|
19
|
+
- - "<"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - "
|
26
|
+
- - "<"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '
|
28
|
+
version: '2'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: overcommit
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,14 +200,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: '2.
|
203
|
+
version: '2.7'
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
209
|
requirements: []
|
210
|
-
rubygems_version: 3.3.
|
210
|
+
rubygems_version: 3.3.20
|
211
211
|
signing_key:
|
212
212
|
specification_version: 4
|
213
213
|
summary: It is helper for work with tcm systems
|