allure-rspec 2.13.5.rc.2 → 2.13.6.3

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: b6f877f7e8b441cb54130d306d3412f312acb8797897183858835c9f022435b8
4
- data.tar.gz: 3c2addeb4d4b3e019f33993bd5b323dde85193c703d72f5e9f61c9045f85a7db
3
+ metadata.gz: c883637d45f77af04f32abc1aa975d12ac01b2bb6562909475036671d9ddb575
4
+ data.tar.gz: 969fccfa4adc1a2c876c3488bf4b586493a7f5030ec51c35c09e5979edded614
5
5
  SHA512:
6
- metadata.gz: c115ec1a95e9f14faed2298b54a29b3dbad62562864c14f635bcec78388fab4be67ef09489dcfa1c5b624fd08c00440f3f408dead25ecf387808630f9ea7e40d
7
- data.tar.gz: be99a4b2fa09a6cfde214028c1d79bdd7b8877eb7dc4f178b80a4475d56d08a8016d44cf28f4841e0f8fb125e6e0b088e35ddd5a619e71aca4b794572cf9d063
6
+ metadata.gz: 4ff9f81eef901ed44ea687f25cae474f53871a6400a4a4b484fb34609a7537a388b1f320a96cc3c6ca421eade0ab58d779889362761b57c66e199d14d1223df3
7
+ data.tar.gz: 200276d474bd396f46dd4b0408c59f2babc2f997d471bfd3347e4cbaed7920f7f554328689da7cea9932f302173da5575a1f80c9c4f3669d6d5faeed94917f88
@@ -22,6 +22,8 @@ module AllureRspec
22
22
  :results_directory=
23
23
 
24
24
  def initialize
25
+ super()
26
+
25
27
  @allure_config = Allure.configuration
26
28
  end
27
29
  end
@@ -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
- lifecycle.start_test_container(
42
- Allure::TestResultContainer.new(name: example_group_notification.group.description),
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
- [].tap do |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
- end
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
- [].tap do |labels|
87
- parents = example_group.parent_groups.map(&:description)
88
- labels << Allure::ResultUtils.suite_label(suite(parents))
89
- labels << Allure::ResultUtils.parent_suite_label(parent_suite(parents))
90
- labels << Allure::ResultUtils.sub_suite_label(sub_suites(parents))
91
- end
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.5.rc.2
4
+ version: 2.13.6.3
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-03-29 00:00:00.000000000 Z
11
+ date: 2020-08-17 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.5.rc.2
19
+ version: 2.13.6.3
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.5.rc.2
26
+ version: 2.13.6.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-core
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,9 +84,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: 2.5.0
85
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3.1
89
+ version: '0'
90
90
  requirements: []
91
91
  rubygems_version: 3.1.2
92
92
  signing_key: