allure-rspec 2.13.6 → 2.13.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/allure_rspec/formatter.rb +4 -3
- data/lib/allure_rspec/rspec_model.rb +18 -16
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f26f885d375599cb9e3903ca34bf49e6339a5ec1554d804796706679178b62d
|
4
|
+
data.tar.gz: aa23237291bd90b696d814797d353d8bf61e7b16769a61235d020b6ffa278317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9009680c99face3c98206ecb186e97f17f3ff1b90f2e2acda6010e8d982783981b147235babe4dc3f9cba3bd7185ab1380f0c6fd66b96c36951fe2b6b5b99791
|
7
|
+
data.tar.gz: 78373bf141e0ff17ab36f78d82438180b486d067775606e511e798c11aac5897dca94f935dacb97a4f8fe3bf66d108eb98c305a82e917eaf24a8fd2b9a9ab2b6
|
@@ -38,9 +38,10 @@ module AllureRspec
|
|
38
38
|
# @param [RSpec::Core::Notifications::GroupNotification] example_group_notification
|
39
39
|
# @return [void]
|
40
40
|
def example_group_started(example_group_notification)
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
description = example_group_notification.group.description.yield_self do |desc|
|
42
|
+
desc.empty? ? "Anonymous" : desc
|
43
|
+
end
|
44
|
+
lifecycle.start_test_container(Allure::TestResultContainer.new(name: description))
|
44
45
|
end
|
45
46
|
|
46
47
|
# Starts example
|
@@ -67,28 +67,30 @@ module AllureRspec
|
|
67
67
|
# @param [RSpec::Core::Example] example
|
68
68
|
# @return [Array<Allure::Label>]
|
69
69
|
def labels(example)
|
70
|
-
[]
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
70
|
+
labels = []
|
71
|
+
labels << Allure::ResultUtils.framework_label("rspec")
|
72
|
+
labels << Allure::ResultUtils.feature_label(example.example_group.description)
|
73
|
+
labels << Allure::ResultUtils.package_label(Pathname.new(strip_relative(example.file_path)).parent.to_s)
|
74
|
+
labels << Allure::ResultUtils.story_label(example.description)
|
75
|
+
labels << Allure::ResultUtils.test_class_label(File.basename(example.file_path, ".rb"))
|
76
|
+
labels << severity(example.metadata)
|
77
|
+
labels.push(*tag_labels(example.metadata))
|
78
|
+
labels.push(*suite_labels(example.example_group))
|
79
|
+
|
80
|
+
labels
|
80
81
|
end
|
81
82
|
|
82
83
|
# Add suite labels
|
83
84
|
# @param [RSpec::Core::ExampleGroup] example_group
|
84
85
|
# @return [Array<Allure::Label>]
|
85
86
|
def suite_labels(example_group)
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
87
|
+
parents = example_group.parent_groups.map { |group| group.description.empty? ? "Anonymous" : group.description }
|
88
|
+
labels = []
|
89
|
+
labels << Allure::ResultUtils.suite_label(suite(parents))
|
90
|
+
labels << Allure::ResultUtils.parent_suite_label(parent_suite(parents)) if parent_suite(parents)
|
91
|
+
labels << Allure::ResultUtils.sub_suite_label(sub_suites(parents)) if sub_suites(parents)
|
92
|
+
|
93
|
+
labels
|
92
94
|
end
|
93
95
|
|
94
96
|
# @param [Array<String>] parents
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.13.6
|
4
|
+
version: 2.13.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allure-ruby-commons
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.13.6
|
19
|
+
version: 2.13.6.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.13.6
|
26
|
+
version: 2.13.6.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|