rspec_html_reporter 1.0.2 → 1.0.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
  SHA1:
3
- metadata.gz: 8ae94974550f41e82238d6bfba8d63f7a3ebef71
4
- data.tar.gz: 0fa08481d76ff8a9d49d7d8165ae45261373a417
3
+ metadata.gz: dc6c52c0d87b8f3754055ccd359c623b6f86bfb2
4
+ data.tar.gz: 723fa7e3c6d1dd823bfaff2f61ff704f65af77b7
5
5
  SHA512:
6
- metadata.gz: c1292b7db6d8e7663437b8959cef71e28e4f1c5bd69f8202732a0705859856f878ac842b1e29e55ab164ffbb719fe674ed6977a4af2188552d858ae253863066
7
- data.tar.gz: 18d735071425e2d5d7b0eee7496b26b0463aac0aa0f877782b32d0ee76f9e4b86dc34dca9299a5300646b7fbf9814945a5f16c2165fff858894cefdfd296e74d
6
+ metadata.gz: 72ee325b4e797e4b3f6ac3c046defc4c1d21d1cdc20d4c1f85727a486d826af99241d6a6bc1f51aef8cffc6c06721c9be923b34d6691154d7716f813262e63af
7
+ data.tar.gz: ebc4e165f2f276f3e0b79715e872bfa6ff988dabded3c99157299287dd0f4afab0bdbcc1c837dfa8dd6bee6bbc8f310d3f12223ad9e97c00cd0ec45b761c4e9c
@@ -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
@@ -152,16 +152,18 @@
152
152
  </div>
153
153
  <div class="panel-body">
154
154
  <%= example.exception.explanation %>
155
- <dl>
156
- <dt>Backtrace:</dt>
157
- <dd>
158
- <ol>
159
- <% example.exception.backtrace_message.each do |message| %>
160
- <li><%= message %></li>
161
- <% end %>
162
- </ol>
163
- </dd>
164
- </dl>
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.2
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-09-13 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec