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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21f0cef80807ac242eddea36ebd1e23f92a1ea5d4544a236ca4439d3d0e8b952
4
- data.tar.gz: 2cd487c7d384789b9cd8fc1ecd4818cd79182b6b9d6ab60d71c370dd1fb519a2
3
+ metadata.gz: ea10f0b9531302112fffc41d4272bd9cab11c3b13f2429d712db6f8b5559cb1a
4
+ data.tar.gz: 84a021f6ea028ec977a406eee88cba071d68ef2411f32e8445343cf833740a49
5
5
  SHA512:
6
- metadata.gz: 377d0932f0f048126bc8d9789e309f30d32ac98ee3e96aa84952e86be9bb5ade61fb9c1a42bb6eafeaf090a5c382699fdf81b10c6c2c93c231abc68b2dfd31a2
7
- data.tar.gz: dc79a72f470ca0a4e37f550d7586060850375e316066537480f2eca51d887f1fac233a0072da7aa714ab441f300667e1be7349ea736c543f1b98ec013ad20f5f
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] comment of example
14
+ # @param [String] exception text of example
10
15
  # @return [Boolean]
11
- def pending_passed?(comment)
12
- comment.match?(/Expected pending.*to fail/)
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] comment of example
21
+ # @param [String] exception text of example
17
22
  # @return [Symbol] `:failed` or `:pending`
18
- def pending_status(comment)
19
- if pending_passed?(comment)
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
- # @retunr [Symbol] status of pending
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(@comment)
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
@@ -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.4.0'
6
6
  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.3.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-01-15 00:00:00.000000000 Z
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: '0'
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: '0'
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.5'
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.4
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