forked from dchelimsky/rspec
/
html_formatted-1.9.2.html
377 lines (350 loc) · 17.5 KB
/
html_formatted-1.9.2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>RSpec results</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<style type="text/css">
body {
margin: 0;
padding: 0;
background: #fff;
font-size: 80%;
}
</style>
<script type="text/javascript">
// <![CDATA[
function moveProgressBar(percentDone) {
document.getElementById("rspec-header").style.width = percentDone +"%";
}
function makeRed(element_id) {
document.getElementById(element_id).style.background = '#C40D0D';
document.getElementById(element_id).style.color = '#FFFFFF';
}
function makeYellow(element_id) {
if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
{
document.getElementById(element_id).style.background = '#FAF834';
document.getElementById(element_id).style.color = '#000000';
}
else
{
document.getElementById(element_id).style.background = '#FAF834';
document.getElementById(element_id).style.color = '#000000';
}
}
// ]]>
</script>
<style type="text/css">
#rspec-header {
background: #65C400; color: #fff; height: 4em;
}
.rspec-report h1 {
margin: 0px 10px 0px 10px;
padding: 10px;
font-family: "Lucida Grande", Helvetica, sans-serif;
font-size: 1.8em;
position: absolute;
}
#summary {
margin: 0; padding: 5px 10px;
font-family: "Lucida Grande", Helvetica, sans-serif;
text-align: right;
top: 0px;
right: 0px;
float:right;
}
#summary p {
margin: 0 0 0 2px;
}
#summary #totals {
font-size: 1.2em;
}
.example_group {
margin: 0 10px 5px;
background: #fff;
}
dl {
margin: 0; padding: 0 0 5px;
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
}
dt {
padding: 3px;
background: #65C400;
color: #fff;
font-weight: bold;
}
dd {
margin: 5px 0 5px 5px;
padding: 3px 3px 3px 18px;
}
dd.spec.passed {
border-left: 5px solid #65C400;
border-bottom: 1px solid #65C400;
background: #DBFFB4; color: #3D7700;
}
dd.spec.failed {
border-left: 5px solid #C20000;
border-bottom: 1px solid #C20000;
color: #C20000; background: #FFFBD3;
}
dd.spec.not_implemented {
border-left: 5px solid #FAF834;
border-bottom: 1px solid #FAF834;
background: #FCFB98; color: #131313;
}
dd.spec.pending_fixed {
border-left: 5px solid #0000C2;
border-bottom: 1px solid #0000C2;
color: #0000C2; background: #D3FBFF;
}
.backtrace {
color: #000;
font-size: 12px;
}
a {
color: #BE5C00;
}
/* Ruby code, style similar to vibrant ink */
.ruby {
font-size: 12px;
font-family: monospace;
color: white;
background-color: black;
padding: 0.1em 0 0.2em 0;
}
.ruby .keyword { color: #FF6600; }
.ruby .constant { color: #339999; }
.ruby .attribute { color: white; }
.ruby .global { color: white; }
.ruby .module { color: white; }
.ruby .class { color: white; }
.ruby .string { color: #66FF00; }
.ruby .ident { color: white; }
.ruby .method { color: #FFCC00; }
.ruby .number { color: white; }
.ruby .char { color: white; }
.ruby .comment { color: #9933CC; }
.ruby .symbol { color: white; }
.ruby .regex { color: #44B4CC; }
.ruby .punct { color: white; }
.ruby .escape { color: white; }
.ruby .interp { color: white; }
.ruby .expr { color: white; }
.ruby .offending { background-color: gray; }
.ruby .linenum {
width: 75px;
padding: 0.1em 1em 0.2em 0;
color: #000000;
background-color: #FFFBD3;
}
</style>
</head>
<body>
<div class="rspec-report">
<div id="rspec-header">
<div id="label">
<h1>RSpec Code Examples</h1>
</div>
<div id="summary">
<p id="totals"> </p>
<p id="duration"> </p>
</div>
</div>
<div class="results">
<div class="example_group">
<dl>
<dt id="example_group_1">Mocker</dt>
<script type="text/javascript">moveProgressBar('5.8');</script>
<dd class="spec passed"><span class="passed_spec_name">should be able to call mock()</span></dd>
<script type="text/javascript">makeRed('rspec-header');</script>
<script type="text/javascript">makeRed('example_group_1');</script>
<script type="text/javascript">moveProgressBar('11.7');</script>
<dd class="spec failed">
<span class="failed_spec_name">should fail when expected message not received</span>
<div class="failure" id="failure_1">
<div class="message"><pre>Mock "poke me" expected :poke with (any args) once, but received it 0 times</pre></div>
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:11:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">9</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">should fail when expected message not received</span><span class="punct">"</span> <span class="keyword">do</span>
<span class="linenum">10</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">poke me</span><span class="punct">")</span>
<span class="offending"><span class="linenum">11</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:poke</span><span class="punct">)</span></span>
<span class="linenum">12</span> <span class="keyword">end</span>
<span class="linenum">13</span> </code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('17.6');</script>
<dd class="spec failed">
<span class="failed_spec_name">should fail when messages are received out of order</span>
<div class="failure" id="failure_2">
<div class="message"><pre>Mock "one two three" received :three out of order</pre></div>
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:20:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">18</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_receive</span><span class="punct">(</span><span class="symbol">:three</span><span class="punct">).</span><span class="ident">ordered</span>
<span class="linenum">19</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">one</span>
<span class="offending"><span class="linenum">20</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">three</span></span>
<span class="linenum">21</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">two</span>
<span class="linenum">22</span> <span class="keyword">end</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('23.5');</script>
<dd class="spec failed">
<span class="failed_spec_name">should get yelled at when sending unexpected messages</span>
<div class="failure" id="failure_3">
<div class="message"><pre>Mock "don't talk to me" expected :any_message_at_all with (no args) 0 times, but received it once</pre></div>
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:27:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">25</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">don't talk to me</span><span class="punct">")</span>
<span class="linenum">26</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">should_not_receive</span><span class="punct">(</span><span class="symbol">:any_message_at_all</span><span class="punct">)</span>
<span class="offending"><span class="linenum">27</span> <span class="ident">mock</span><span class="punct">.</span><span class="ident">any_message_at_all</span></span>
<span class="linenum">28</span> <span class="keyword">end</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('29.4');</script>
<dd class="spec pending_fixed">
<span class="failed_spec_name">has a bug we need to fix</span>
<div class="failure" id="failure_4">
<div class="message"><pre>Expected pending 'here is the bug' to fail. No Error was raised.</pre></div>
<div class="backtrace"><pre>./examples/failing/mocking_example.rb:31:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">29</span>
<span class="linenum">30</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">has a bug we need to fix</span><span class="punct">"</span> <span class="keyword">do</span>
<span class="offending"><span class="linenum">31</span> <span class="ident">pending</span> <span class="punct">"</span><span class="string">here is the bug</span><span class="punct">"</span> <span class="keyword">do</span></span>
<span class="linenum">32</span> <span class="comment"># Actually, no. It's fixed. This will fail because it passes :-)</span>
<span class="linenum">33</span> <span class="ident">mock</span> <span class="punct">=</span> <span class="ident">mock</span><span class="punct">("</span><span class="string">Bug</span><span class="punct">")</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_2">Running specs with --diff</dt>
<script type="text/javascript">makeRed('example_group_2');</script>
<script type="text/javascript">moveProgressBar('35.2');</script>
<dd class="spec failed">
<span class="failed_spec_name">should print diff of different strings</span>
<div class="failure" id="failure_5">
<div class="message"><pre>expected: "RSpec is a\nbehaviour driven development\nframework for Ruby\n",
got: "RSpec is a\nbehavior driven development\nframework for Ruby\n" (using ==)
Diff:
@@ -1,4 +1,4 @@
RSpec is a
-behaviour driven development
+behavior driven development
framework for Ruby
</pre></div>
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:13:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">11</span><span class="ident">framework</span> <span class="keyword">for</span> <span class="constant">Ruby</span>
<span class="linenum">12</span><span class="constant">EOF</span>
<span class="offending"><span class="linenum">13</span> <span class="ident">usa</span><span class="punct">.</span><span class="ident">should</span> <span class="punct">==</span> <span class="ident">uk</span></span>
<span class="linenum">14</span> <span class="keyword">end</span></code></pre>
</div>
</dd>
<script type="text/javascript">moveProgressBar('41.1');</script>
<dd class="spec failed">
<span class="failed_spec_name">should print diff of different objects' pretty representation</span>
<div class="failure" id="failure_6">
<div class="message"><pre>
expected <Animal
name=bob,
species=tortoise
>
got <Animal
name=bob,
species=giraffe
>
(compared using eql?)
</pre></div>
<div class="backtrace"><pre>./examples/failing/diffing_spec.rb:34:in `block (2 levels) in <top (required)>'
./spec/spec_helper.rb:42:in `run_with'
./spec/spec/runner/formatter/html_formatter_spec.rb:41:in `block (4 levels) in <module:Formatter>'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `chdir'
./spec/spec/runner/formatter/html_formatter_spec.rb:29:in `block (3 levels) in <module:Formatter>'</pre></div>
<pre class="ruby"><code><span class="linenum">32</span> <span class="ident">expected</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">"</span><span class="string">bob</span><span class="punct">",</span> <span class="punct">"</span><span class="string">giraffe</span><span class="punct">"</span>
<span class="linenum">33</span> <span class="ident">actual</span> <span class="punct">=</span> <span class="constant">Animal</span><span class="punct">.</span><span class="ident">new</span> <span class="punct">"</span><span class="string">bob</span><span class="punct">",</span> <span class="punct">"</span><span class="string">tortoise</span><span class="punct">"</span>
<span class="offending"><span class="linenum">34</span> <span class="ident">expected</span><span class="punct">.</span><span class="ident">should</span> <span class="ident">eql</span><span class="punct">(</span><span class="ident">actual</span><span class="punct">)</span></span>
<span class="linenum">35</span> <span class="keyword">end</span>
<span class="linenum">36</span><span class="keyword">end</span></code></pre>
</div>
</dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_3">A consumer of a stub</dt>
<script type="text/javascript">moveProgressBar('47.0');</script>
<dd class="spec passed"><span class="passed_spec_name">should be able to stub methods on any Object</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_4">A stubbed method on a class</dt>
<script type="text/javascript">moveProgressBar('52.9');</script>
<dd class="spec passed"><span class="passed_spec_name">should return the stubbed value</span></dd>
<script type="text/javascript">moveProgressBar('58.8');</script>
<dd class="spec passed"><span class="passed_spec_name">should revert to the original method after each spec</span></dd>
<script type="text/javascript">moveProgressBar('64.7');</script>
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock the same message</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_5">A mock</dt>
<script type="text/javascript">moveProgressBar('70.5');</script>
<dd class="spec passed"><span class="passed_spec_name">can stub!</span></dd>
<script type="text/javascript">moveProgressBar('76.4');</script>
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock</span></dd>
<script type="text/javascript">moveProgressBar('82.3');</script>
<dd class="spec passed"><span class="passed_spec_name">can stub! and mock the same message</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_6">pending example (using pending method)</dt>
<script type="text/javascript">makeYellow('example_group_6');</script>
<script type="text/javascript">moveProgressBar('88.2');</script>
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should be reported as "PENDING: for some reason" (PENDING: for some reason)</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_7">pending example (with no block)</dt>
<script type="text/javascript">makeYellow('example_group_7');</script>
<script type="text/javascript">moveProgressBar('94.1');</script>
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should be reported as "PENDING: Not Yet Implemented" (PENDING: Not Yet Implemented)</span></dd>
</dl>
</div>
<div class="example_group">
<dl>
<dt id="example_group_8">pending example (with block for pending)</dt>
<script type="text/javascript">makeYellow('example_group_8');</script>
<script type="text/javascript">moveProgressBar('100.0');</script>
<dd class="spec not_implemented"><span class="not_implemented_spec_name">should have a failing block, passed to pending, reported as "PENDING: for some reason" (PENDING: for some reason)</span></dd>
</dl>
</div>
<script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>x seconds</strong>";</script>
<script type="text/javascript">document.getElementById('totals').innerHTML = "17 examples, 6 failures, 3 pending";</script>
</div>
</div>
</body>
</html>