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: 21f0cef80807ac242eddea36ebd1e23f92a1ea5d4544a236ca4439d3d0e8b952
4
- data.tar.gz: 2cd487c7d384789b9cd8fc1ecd4818cd79182b6b9d6ab60d71c370dd1fb519a2
3
+ metadata.gz: 4d1e82e008cc94c2cbce3317054b30dd0a275af707df1519a79e4e825451cce5
4
+ data.tar.gz: 171f3593344d25e7546ea2ef30c283054d7b0d0625f84b721152a0fa3b79bc5b
5
5
  SHA512:
6
- metadata.gz: 377d0932f0f048126bc8d9789e309f30d32ac98ee3e96aa84952e86be9bb5ade61fb9c1a42bb6eafeaf090a5c382699fdf81b10c6c2c93c231abc68b2dfd31a2
7
- data.tar.gz: dc79a72f470ca0a4e37f550d7586060850375e316066537480f2eca51d887f1fac233a0072da7aa714ab441f300667e1be7349ea736c543f1b98ec013ad20f5f
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] comment of example
9
+ # @param [String] exception text of example
10
10
  # @return [Boolean]
11
- def pending_passed?(comment)
12
- comment.match?(/Expected pending.*to fail/)
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] comment of example
16
+ # @param [String] exception text of example
17
17
  # @return [Symbol] `:failed` or `:pending`
18
- def pending_status(comment)
19
- if pending_passed?(comment)
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
- # @retunr [Symbol] status of pending
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(@comment)
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module OnlyofficeTcmHelper
4
4
  # @return [String] version of gem
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE