rspec_html_reporter 1.0.2 → 1.0.3
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 +4 -4
- data/lib/rspec_html_reporter.rb +3 -0
- data/templates/report.erb +12 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc6c52c0d87b8f3754055ccd359c623b6f86bfb2
|
4
|
+
data.tar.gz: 723fa7e3c6d1dd823bfaff2f61ff704f65af77b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ee325b4e797e4b3f6ac3c046defc4c1d21d1cdc20d4c1f85727a486d826af99241d6a6bc1f51aef8cffc6c06721c9be923b34d6691154d7716f813262e63af
|
7
|
+
data.tar.gz: ebc4e165f2f276f3e0b79715e872bfa6ff988dabded3c99157299287dd0f4afab0bdbcc1c837dfa8dd6bee6bbc8f310d3f12223ad9e97c00cd0ec45b761c4e9c
|
data/lib/rspec_html_reporter.rb
CHANGED
@@ -47,11 +47,14 @@ class Oopsy
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def formatted_backtrace(example, exception)
|
50
|
+
# To avoid an error in format_backtrace. RSpec's version below v3.5 will throw exception.
|
51
|
+
return [] unless example
|
50
52
|
formatter = RSpec.configuration.backtrace_formatter
|
51
53
|
formatter.format_backtrace(exception.backtrace, example.metadata)
|
52
54
|
end
|
53
55
|
|
54
56
|
def process_source
|
57
|
+
return '' if @backtrace_message.empty?
|
55
58
|
data = @backtrace_message.first.split(':')
|
56
59
|
unless data.empty?
|
57
60
|
if os == :windows
|
data/templates/report.erb
CHANGED
@@ -152,16 +152,18 @@
|
|
152
152
|
</div>
|
153
153
|
<div class="panel-body">
|
154
154
|
<%= example.exception.explanation %>
|
155
|
-
|
156
|
-
<
|
157
|
-
|
158
|
-
<
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
155
|
+
<% unless example.exception.backtrace_message.empty? %>
|
156
|
+
<dl>
|
157
|
+
<dt>Backtrace:</dt>
|
158
|
+
<dd>
|
159
|
+
<ol>
|
160
|
+
<% example.exception.backtrace_message.each do |message| %>
|
161
|
+
<li><%= message %></li>
|
162
|
+
<% end %>
|
163
|
+
</ol>
|
164
|
+
</dd>
|
165
|
+
</dl>
|
166
|
+
<% end %>
|
165
167
|
<%= example.exception.highlighted_source %>
|
166
168
|
</div>
|
167
169
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_html_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vishal Banthia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|