onlyoffice_tcm_helper 0.3.0 → 0.3.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d1e82e008cc94c2cbce3317054b30dd0a275af707df1519a79e4e825451cce5
|
4
|
+
data.tar.gz: 171f3593344d25e7546ea2ef30c283054d7b0d0625f84b721152a0fa3b79bc5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed67b7b7cc1f3064b014ca54818cbdf655b85dc4a861aa9bef891c2daa24e59aa36066b4482a436d876ccbee9411c5605d9955ca846e6673239990e7420692e7
|
7
|
+
data.tar.gz: 0236f7a43696d1b002f0714d0307e1bb829fbc70530d5ac1b7c7872f368c7eb55cac925075914fb1114b5a532e170c347af5b5b0835f9190774e3b52082ade77
|
@@ -6,17 +6,17 @@ module OnlyofficeTcmHelper
|
|
6
6
|
# Check if pending example passed
|
7
7
|
# This situation is incorrect - if pending is passing for some reason
|
8
8
|
# This pending comment should be removed and investigate
|
9
|
-
# @param [String]
|
9
|
+
# @param [String] exception text of example
|
10
10
|
# @return [Boolean]
|
11
|
-
def pending_passed?(
|
12
|
-
|
11
|
+
def pending_passed?(exception)
|
12
|
+
exception.start_with?('Expected example to fail since it is pending, but it passed')
|
13
13
|
end
|
14
14
|
|
15
15
|
# Get pending status by it's comment
|
16
|
-
# @param [String]
|
16
|
+
# @param [String] exception text of example
|
17
17
|
# @return [Symbol] `:failed` or `:pending`
|
18
|
-
def pending_status(
|
19
|
-
if pending_passed?(
|
18
|
+
def pending_status(exception)
|
19
|
+
if pending_passed?(exception)
|
20
20
|
:failed
|
21
21
|
else
|
22
22
|
:pending
|
@@ -25,11 +25,12 @@ module OnlyofficeTcmHelper
|
|
25
25
|
|
26
26
|
# Handle pending information
|
27
27
|
# @param [RSpec::Core::Example] example to handle
|
28
|
-
# @
|
28
|
+
# @return [Symbol] status of pending
|
29
29
|
def handle_pending(example)
|
30
30
|
@comment = example.execution_result.pending_message
|
31
|
+
exception = example.exception.to_s
|
31
32
|
|
32
|
-
pending_status(
|
33
|
+
pending_status(exception)
|
33
34
|
end
|
34
35
|
end
|
35
36
|
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
|