kanoah_rspec_formatter 0.2.11 → 0.2.12
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: c7f75280e6de836ade9651a83a0804b4f441c937
|
4
|
+
data.tar.gz: 347b1bab09bea16fe8c4cfaaa2bcc7cadc621ff8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e424be1a4992dc9dddb70b8a573e081975f74fb1db46547531075f3d928f7411905d433e519fc934f03faf7d3f92262bd8302b95e11cbde8aaad663e730456f
|
7
|
+
data.tar.gz: 1404fe0a4ab78c9f822e13bcd005f65dc85919d47ef47744c7a6fa54cc81f9a7b9f612987e4e062cfa2462a2a2943e72f367436ca55f1ec3c105627deeadaa5d
|
@@ -2,9 +2,5 @@ require 'rspec/core/formatters/base_formatter'
|
|
2
2
|
module KanoahRSpecFormatter
|
3
3
|
class BaseFormatter < RSpec::Core::Formatters::BaseFormatter
|
4
4
|
NOTIFICATIONS = %i[start example_started example_passed example_failed example_pending].freeze
|
5
|
-
|
6
|
-
def start(notification)
|
7
|
-
@api = Kanoah::Client.new
|
8
|
-
end
|
9
5
|
end
|
10
6
|
end
|
@@ -6,10 +6,6 @@ class KanoahResultFormatter < KanoahRSpecFormatter::BaseFormatter
|
|
6
6
|
@output = output
|
7
7
|
end
|
8
8
|
|
9
|
-
def start(notification)
|
10
|
-
super(notification)
|
11
|
-
end
|
12
|
-
|
13
9
|
def example_passed(notification)
|
14
10
|
proccess_result(notification.example) if notification.example.metadata.key?(:test_id) && !test_id(notification.example).empty?
|
15
11
|
end
|
@@ -29,8 +25,9 @@ class KanoahResultFormatter < KanoahRSpecFormatter::BaseFormatter
|
|
29
25
|
private
|
30
26
|
|
31
27
|
def proccess_result(example)
|
28
|
+
api = Kanoah::Client.new
|
32
29
|
body = example.metadata[:steps].nil? ? without_steps(example) : with_steps(example)
|
33
|
-
|
30
|
+
api.test_run_id ? api.post_new_result_to_run(body) : api.post_new_result(body)
|
34
31
|
end
|
35
32
|
|
36
33
|
def test_id(example)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kanoah_rspec_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Automation Wizards
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|