rspec_junit_formatter 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2262f9dd5b2368ab268f8f251b528b7ae60816accb3192bd1dd0b250ef097bc
4
- data.tar.gz: dd120f276314e33ec44ad6982b3ef9371519a38d770a3de33800ef8015067275
3
+ metadata.gz: 892c4451f42f7fdbfe335df86dd6f910d5fc4a54b91614b2da4283490a635646
4
+ data.tar.gz: 870ebdab7dd2e600b57493ce26437cee64b73cdc1cd05b48d6f67ad7160e98e8
5
5
  SHA512:
6
- metadata.gz: f6733eaf055a5019767ea3586e426088ebe1eb3f57d5dcb2e6dba9d51bfa1543b36d410f5ac19142c512a4096976a8a02a23d7d55160f8028cbe9807d98c344f
7
- data.tar.gz: 9bd13f22884872acb215295c6b45b0a332c3c510918be068b6e7619479db8ca9d991df124ab47a535c164fac42e424c8b6152158acab1839c07bf7de95eaa43b
6
+ metadata.gz: 4b55d404b3e056fd85dcef4712c386de35448f442abbc750b8fe9fc5d9953b79bb9552790bff53f88f67a91d7685765d9ddbb9cbefba0317d7cd2c558dabd036
7
+ data.tar.gz: aa4f7f1061266efeb3e4da1756d5a47969c8f1964174dbba23054b580a035a356d8b8880f2da47b940f423a5f2fb35371eed52990ab2540f133f49708bbe2bf5
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [jenkins-junit]: https://jenkins.io/doc/pipeline/steps/junit/
10
10
  [buildkite-junit]: https://github.com/buildkite/rspec-junit-example
11
11
  [circleci-junit]: https://circleci.com/docs/2.0/collect-test-data/
12
- [gitlab-junit]: https://docs.gitlab.com/ee/ci/junit_test_reports.html#ruby-example
12
+ [gitlab-junit]: https://docs.gitlab.com/ee/ci/unit_test_reports.html#ruby-example
13
13
 
14
14
  ## Usage
15
15
 
@@ -33,7 +33,7 @@ You can use it in combination with other [formatters][rspec-formatters], too:
33
33
  rspec --format progress --format RspecJunitFormatter --out rspec.xml
34
34
  ```
35
35
 
36
- [rspec-formatters]: https://relishapp.com/rspec/rspec-core/v/3-6/docs/formatters
36
+ [rspec-formatters]: https://rspec.info/features/3-12/rspec-core/formatters/
37
37
 
38
38
  ### Using in your project with Bundler
39
39
 
@@ -42,7 +42,7 @@ Add it to your Gemfile if you're using [Bundler][bundler]. Put it in the same gr
42
42
  ```ruby
43
43
  group :test do
44
44
  gem "rspec"
45
- gem "rspec_junit_formatter"
45
+ gem "rspec_junit_formatter", require: false
46
46
  end
47
47
  ```
48
48
 
@@ -53,7 +53,7 @@ Put the same arguments as the commands above in [your `.rspec`][rspec-file]:
53
53
  --out rspec.xml
54
54
  ```
55
55
  [bundler]: https://bundler.io
56
- [rspec-file]: https://relishapp.com/rspec/rspec-core/v/3-6/docs/configuration/read-command-line-configuration-options-from-files
56
+ [rspec-file]: https://rspec.info/features/3-12/rspec-core/configuration/read-options-from-file/
57
57
 
58
58
  ### Parallel tests
59
59
 
@@ -90,7 +90,7 @@ RSpec.configure do |config|
90
90
  end
91
91
  ```
92
92
 
93
- Note that this example captures all output from every example all the time, potentially interfering with local debugging. You might like to restrict this to only on CI, or by using [rspec filters](https://relishapp.com/rspec/rspec-core/docs/hooks/filters).
93
+ Note that this example captures all output from every example all the time, potentially interfering with local debugging. You might like to restrict this to only on CI, or by using [rspec filters](https://rspec.info/features/3-12/rspec-core/hooks/filtering/).
94
94
 
95
95
  ## Caveats
96
96
 
@@ -88,7 +88,13 @@ private
88
88
  end
89
89
 
90
90
  def failure_for(notification)
91
- strip_diff_colors(notification.message_lines.join("\n")) << "\n" << notification.formatted_backtrace.join("\n")
91
+ exception = exception_for(notification)
92
+
93
+ if aggregate_failure?(exception)
94
+ strip_diff_colors(exception.message)
95
+ else
96
+ strip_diff_colors(notification.message_lines.join("\n")) << "\n" << notification.formatted_backtrace.join("\n")
97
+ end
92
98
  end
93
99
 
94
100
  def exception_for(notification)
@@ -141,6 +147,13 @@ private
141
147
  def stderr_for(example_notification)
142
148
  example_notification.example.metadata[:stderr]
143
149
  end
150
+
151
+ def aggregate_failure?(exception)
152
+ # Introduced in rspec 3.3
153
+ return false unless defined?(RSpec::Expectations::MultipleExpectationsNotMetError)
154
+
155
+ exception.is_a?(RSpec::Expectations::MultipleExpectationsNotMetError)
156
+ end
144
157
  end
145
158
 
146
159
  # rspec-core 3.0.x forgot to mark this as a module function which causes:
@@ -70,7 +70,9 @@ private
70
70
  output << %{ classname="#{escape(classname_for(example))}"}
71
71
  output << %{ name="#{escape(description_for(example))}"}
72
72
  output << %{ file="#{escape(example_group_file_path_for(example))}"}
73
- output << %{ time="#{escape("%.6f" % duration_for(example))}"}
73
+ if duration = duration_for(example)
74
+ output << %{ time="#{escape("%.6f" % duration)}"}
75
+ end
74
76
  output << %{>}
75
77
  yield if block_given?
76
78
  xml_dump_output(example)
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,18 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec_junit_formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Cochran
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
12
11
  -----BEGIN CERTIFICATE-----
13
- MIIDKDCCAhCgAwIBAgIBCDANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
12
+ MIIDKDCCAhCgAwIBAgIBBTANBgkqhkiG9w0BAQsFADA6MQ0wCwYDVQQDDARzajI2
14
13
  MRQwEgYKCZImiZPyLGQBGRYEc2oyNjETMBEGCgmSJomT8ixkARkWA2NvbTAeFw0y
15
- MTA0MjcwMzIxMjZaFw0yMjA0MjcwMzIxMjZaMDoxDTALBgNVBAMMBHNqMjYxFDAS
14
+ NjEwMjAyMzA3MDhaFw0yNzEwMjAyMz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mIhtX8G+1HeyKck/qDaDyoO
26
+ GgETed1QI+mcbxl1+O8w1QSuvClVm7y+Nk5PeOxjPT/2DMuChLyTP3NYnyiHifdS
27
+ OKO8Px6knr64z1LWwB+m04k+z+D1oD6757fkD96O1C1AtMtNoQHwfNX7JSPhQSQM
28
+ z4nsMtYoPwFoGnDqvraRmVqMLL3asgAh8SYE6c4eoaX1b0r83v6aLnIh3ew=
30
29
  -----END CERTIFICATE-----
31
- date: 2022-01-06 00:00:00.000000000 Z
30
+ date: 1980-01-02 00:00:00.000000000 Z
32
31
  dependencies:
33
32
  - !ruby/object:Gem::Dependency
34
33
  name: rspec-core
@@ -148,7 +147,6 @@ licenses:
148
147
  - MIT
149
148
  metadata:
150
149
  changelog_uri: https://github.com/sj26/rspec_junit_formatter/blob/HEAD/CHANGELOG.md
151
- post_install_message:
152
150
  rdoc_options: []
153
151
  require_paths:
154
152
  - lib
@@ -156,15 +154,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
154
  requirements:
157
155
  - - ">="
158
156
  - !ruby/object:Gem::Version
159
- version: 2.0.0
157
+ version: 2.3.0
160
158
  required_rubygems_version: !ruby/object:Gem::Requirement
161
159
  requirements:
162
160
  - - ">="
163
161
  - !ruby/object:Gem::Version
164
162
  version: 2.0.0
165
163
  requirements: []
166
- rubygems_version: 3.2.26
167
- signing_key:
164
+ rubygems_version: 3.6.9
168
165
  specification_version: 4
169
166
  summary: RSpec JUnit XML formatter
170
167
  test_files: []
metadata.gz.sig CHANGED
Binary file