keydown 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,545 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
+ <head>
7
+ <title>RSpec results</title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+ <meta http-equiv="Expires" content="-1" />
10
+ <meta http-equiv="Pragma" content="no-cache" />
11
+ <style type="text/css">
12
+ body {
13
+ margin: 0;
14
+ padding: 0;
15
+ background: #fff;
16
+ font-size: 80%;
17
+ }
18
+ </style>
19
+ <script type="text/javascript">
20
+ // <![CDATA[
21
+ function moveProgressBar(percentDone) {
22
+ document.getElementById("rspec-header").style.width = percentDone +"%";
23
+ }
24
+ function makeRed(element_id) {
25
+ document.getElementById(element_id).style.background = '#C40D0D';
26
+ document.getElementById(element_id).style.color = '#FFFFFF';
27
+ }
28
+
29
+ function makeYellow(element_id) {
30
+ if (element_id == "rspec-header" && document.getElementById(element_id).style.background != '#C40D0D')
31
+ {
32
+ document.getElementById(element_id).style.background = '#FAF834';
33
+ document.getElementById(element_id).style.color = '#000000';
34
+ }
35
+ else
36
+ {
37
+ document.getElementById(element_id).style.background = '#FAF834';
38
+ document.getElementById(element_id).style.color = '#000000';
39
+ }
40
+ }
41
+
42
+ // ]]>
43
+ </script>
44
+ <style type="text/css">
45
+ #rspec-header {
46
+ background: #65C400; color: #fff; height: 4em;
47
+ }
48
+
49
+ .rspec-report h1 {
50
+ margin: 0px 10px 0px 10px;
51
+ padding: 10px;
52
+ font-family: "Lucida Grande", Helvetica, sans-serif;
53
+ font-size: 1.8em;
54
+ position: absolute;
55
+ }
56
+
57
+ #summary {
58
+ margin: 0; padding: 5px 10px;
59
+ font-family: "Lucida Grande", Helvetica, sans-serif;
60
+ text-align: right;
61
+ top: 0px;
62
+ right: 0px;
63
+ float:right;
64
+ }
65
+
66
+ #summary p {
67
+ margin: 0 0 0 2px;
68
+ }
69
+
70
+ #summary #totals {
71
+ font-size: 1.2em;
72
+ }
73
+
74
+ .example_group {
75
+ margin: 0 10px 5px;
76
+ background: #fff;
77
+ }
78
+
79
+ dl {
80
+ margin: 0; padding: 0 0 5px;
81
+ font: normal 11px "Lucida Grande", Helvetica, sans-serif;
82
+ }
83
+
84
+ dt {
85
+ padding: 3px;
86
+ background: #65C400;
87
+ color: #fff;
88
+ font-weight: bold;
89
+ }
90
+
91
+ dd {
92
+ margin: 5px 0 5px 5px;
93
+ padding: 3px 3px 3px 18px;
94
+ }
95
+
96
+ dd.spec.passed {
97
+ border-left: 5px solid #65C400;
98
+ border-bottom: 1px solid #65C400;
99
+ background: #DBFFB4; color: #3D7700;
100
+ }
101
+
102
+ dd.spec.failed {
103
+ border-left: 5px solid #C20000;
104
+ border-bottom: 1px solid #C20000;
105
+ color: #C20000; background: #FFFBD3;
106
+ }
107
+
108
+ dd.spec.not_implemented {
109
+ border-left: 5px solid #FAF834;
110
+ border-bottom: 1px solid #FAF834;
111
+ background: #FCFB98; color: #131313;
112
+ }
113
+
114
+ dd.spec.pending_fixed {
115
+ border-left: 5px solid #0000C2;
116
+ border-bottom: 1px solid #0000C2;
117
+ color: #0000C2; background: #D3FBFF;
118
+ }
119
+
120
+ .backtrace {
121
+ color: #000;
122
+ font-size: 12px;
123
+ }
124
+
125
+ a {
126
+ color: #BE5C00;
127
+ }
128
+
129
+ /* Ruby code, style similar to vibrant ink */
130
+ .ruby {
131
+ font-size: 12px;
132
+ font-family: monospace;
133
+ color: white;
134
+ background-color: black;
135
+ padding: 0.1em 0 0.2em 0;
136
+ }
137
+
138
+ .ruby .keyword { color: #FF6600; }
139
+ .ruby .constant { color: #339999; }
140
+ .ruby .attribute { color: white; }
141
+ .ruby .global { color: white; }
142
+ .ruby .module { color: white; }
143
+ .ruby .class { color: white; }
144
+ .ruby .string { color: #66FF00; }
145
+ .ruby .ident { color: white; }
146
+ .ruby .method { color: #FFCC00; }
147
+ .ruby .number { color: white; }
148
+ .ruby .char { color: white; }
149
+ .ruby .comment { color: #9933CC; }
150
+ .ruby .symbol { color: white; }
151
+ .ruby .regex { color: #44B4CC; }
152
+ .ruby .punct { color: white; }
153
+ .ruby .escape { color: white; }
154
+ .ruby .interp { color: white; }
155
+ .ruby .expr { color: white; }
156
+
157
+ .ruby .offending { background-color: gray; }
158
+ .ruby .linenum {
159
+ width: 75px;
160
+ padding: 0.1em 1em 0.2em 0;
161
+ color: #000000;
162
+ background-color: #FFFBD3;
163
+ }
164
+
165
+ </style>
166
+ </head>
167
+ <body>
168
+ <div class="rspec-report">
169
+
170
+ <div id="rspec-header">
171
+ <div id="label">
172
+ <h1>RSpec Code Examples</h1>
173
+ </div>
174
+
175
+ <div id="summary">
176
+ <p id="totals">&nbsp;</p>
177
+ <p id="duration">&nbsp;</p>
178
+ </div>
179
+ </div>
180
+
181
+ <div class="results">
182
+ <div class="example_group">
183
+ <dl>
184
+ <dt id="example_group_1">Keydown::Slide without a CSS classname</dt>
185
+ <script type="text/javascript">moveProgressBar('0.9');</script>
186
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
187
+ <script type="text/javascript">moveProgressBar('1.8');</script>
188
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
189
+ <script type="text/javascript">moveProgressBar('2.7');</script>
190
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
191
+ <script type="text/javascript">moveProgressBar('3.6');</script>
192
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
193
+ </dl>
194
+ </div>
195
+ <div class="example_group">
196
+ <dl>
197
+ <dt id="example_group_2">Keydown::Slide without a CSS classname when generating HTML</dt>
198
+ <script type="text/javascript">moveProgressBar('4.5');</script>
199
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
200
+ <script type="text/javascript">moveProgressBar('5.5');</script>
201
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
202
+ <script type="text/javascript">moveProgressBar('6.4');</script>
203
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
204
+ </dl>
205
+ </div>
206
+ <div class="example_group">
207
+ <dl>
208
+ <dt id="example_group_3">Keydown::Slide with a single CSS classname</dt>
209
+ <script type="text/javascript">moveProgressBar('7.3');</script>
210
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
211
+ <script type="text/javascript">moveProgressBar('8.2');</script>
212
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
213
+ <script type="text/javascript">moveProgressBar('9.1');</script>
214
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
215
+ <script type="text/javascript">moveProgressBar('10.0');</script>
216
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
217
+ </dl>
218
+ </div>
219
+ <div class="example_group">
220
+ <dl>
221
+ <dt id="example_group_4">Keydown::Slide with a single CSS classname when generating HTML</dt>
222
+ <script type="text/javascript">moveProgressBar('11.0');</script>
223
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
224
+ <script type="text/javascript">moveProgressBar('11.9');</script>
225
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
226
+ <script type="text/javascript">moveProgressBar('12.8');</script>
227
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
228
+ </dl>
229
+ </div>
230
+ <div class="example_group">
231
+ <dl>
232
+ <dt id="example_group_5">Keydown::Slide with multiple CSS classnames</dt>
233
+ <script type="text/javascript">moveProgressBar('13.7');</script>
234
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
235
+ <script type="text/javascript">moveProgressBar('14.6');</script>
236
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
237
+ <script type="text/javascript">moveProgressBar('15.5');</script>
238
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
239
+ <script type="text/javascript">moveProgressBar('16.5');</script>
240
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
241
+ </dl>
242
+ </div>
243
+ <div class="example_group">
244
+ <dl>
245
+ <dt id="example_group_6">Keydown::Slide with multiple CSS classnames generating HTML</dt>
246
+ <script type="text/javascript">moveProgressBar('17.4');</script>
247
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
248
+ <script type="text/javascript">moveProgressBar('18.3');</script>
249
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
250
+ <script type="text/javascript">moveProgressBar('19.2');</script>
251
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
252
+ </dl>
253
+ </div>
254
+ <div class="example_group">
255
+ <dl>
256
+ <dt id="example_group_7">Keydown::Slide without a note</dt>
257
+ <script type="text/javascript">moveProgressBar('20.1');</script>
258
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
259
+ <script type="text/javascript">moveProgressBar('21.1');</script>
260
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
261
+ </dl>
262
+ </div>
263
+ <div class="example_group">
264
+ <dl>
265
+ <dt id="example_group_8">Keydown::Slide without a note when generating HTML</dt>
266
+ <script type="text/javascript">moveProgressBar('22.0');</script>
267
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
268
+ <script type="text/javascript">moveProgressBar('22.9');</script>
269
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
270
+ <script type="text/javascript">moveProgressBar('23.8');</script>
271
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
272
+ </dl>
273
+ </div>
274
+ <div class="example_group">
275
+ <dl>
276
+ <dt id="example_group_9">Keydown::Slide with code to higlight using the Slidedown syntax</dt>
277
+ <script type="text/javascript">moveProgressBar('24.7');</script>
278
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
279
+ <script type="text/javascript">moveProgressBar('25.6');</script>
280
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
281
+ <script type="text/javascript">moveProgressBar('26.6');</script>
282
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
283
+ <script type="text/javascript">moveProgressBar('27.5');</script>
284
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
285
+ </dl>
286
+ </div>
287
+ <div class="example_group">
288
+ <dl>
289
+ <dt id="example_group_10">Keydown::Slide with code to higlight using the Slidedown syntax when generating HTML</dt>
290
+ <script type="text/javascript">moveProgressBar('28.4');</script>
291
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
292
+ <script type="text/javascript">moveProgressBar('29.3');</script>
293
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
294
+ <script type="text/javascript">moveProgressBar('30.2');</script>
295
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
296
+ <script type="text/javascript">moveProgressBar('31.1');</script>
297
+ <dd class="spec passed"><span class="passed_spec_name">should colorize the code fragments</span></dd>
298
+ </dl>
299
+ </div>
300
+ <div class="example_group">
301
+ <dl>
302
+ <dt id="example_group_11">Keydown::Slide with code to higlight using the Github markup syntax</dt>
303
+ <script type="text/javascript">moveProgressBar('32.1');</script>
304
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
305
+ <script type="text/javascript">moveProgressBar('33.0');</script>
306
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
307
+ <script type="text/javascript">moveProgressBar('33.9');</script>
308
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
309
+ <script type="text/javascript">moveProgressBar('34.8');</script>
310
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
311
+ </dl>
312
+ </div>
313
+ <div class="example_group">
314
+ <dl>
315
+ <dt id="example_group_12">Keydown::Slide with code to higlight using the Github markup syntax when generating HTML</dt>
316
+ <script type="text/javascript">moveProgressBar('35.7');</script>
317
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
318
+ <script type="text/javascript">moveProgressBar('36.6');</script>
319
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
320
+ <script type="text/javascript">moveProgressBar('37.6');</script>
321
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
322
+ <script type="text/javascript">moveProgressBar('38.5');</script>
323
+ <dd class="spec passed"><span class="passed_spec_name">should colorize the code fragments</span></dd>
324
+ </dl>
325
+ </div>
326
+ <div class="example_group">
327
+ <dl>
328
+ <dt id="example_group_13">Keydown::Slide with an image for a full-bleed background</dt>
329
+ <script type="text/javascript">moveProgressBar('39.4');</script>
330
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
331
+ <script type="text/javascript">moveProgressBar('40.3');</script>
332
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
333
+ <script type="text/javascript">moveProgressBar('41.2');</script>
334
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
335
+ <script type="text/javascript">moveProgressBar('42.2');</script>
336
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
337
+ </dl>
338
+ </div>
339
+ <div class="example_group">
340
+ <dl>
341
+ <dt id="example_group_14">Keydown::Slide with an image for a full-bleed background when generating HTML</dt>
342
+ <script type="text/javascript">moveProgressBar('43.1');</script>
343
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
344
+ <script type="text/javascript">moveProgressBar('44.0');</script>
345
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
346
+ <script type="text/javascript">moveProgressBar('44.9');</script>
347
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
348
+ <script type="text/javascript">moveProgressBar('45.8');</script>
349
+ <dd class="spec passed"><span class="passed_spec_name">should remove any declaration of a background image</span></dd>
350
+ <script type="text/javascript">moveProgressBar('46.7');</script>
351
+ <dd class="spec passed"><span class="passed_spec_name">should save off the background image info for use when generating the HTML</span></dd>
352
+ <script type="text/javascript">moveProgressBar('47.7');</script>
353
+ <dd class="spec passed"><span class="passed_spec_name">should add the full-background class to the containing div</span></dd>
354
+ <script type="text/javascript">moveProgressBar('48.6');</script>
355
+ <dd class="spec passed"><span class="passed_spec_name">should add the background image class to the containing div</span></dd>
356
+ </dl>
357
+ </div>
358
+ <div class="example_group">
359
+ <dl>
360
+ <dt id="example_group_15">Keydown::Slide with an image for a full-bleed background with a Flickr attribution</dt>
361
+ <script type="text/javascript">moveProgressBar('49.5');</script>
362
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames</span></dd>
363
+ <script type="text/javascript">moveProgressBar('50.4');</script>
364
+ <dd class="spec passed"><span class="passed_spec_name">should extract the slide content</span></dd>
365
+ <script type="text/javascript">moveProgressBar('51.3');</script>
366
+ <dd class="spec passed"><span class="passed_spec_name">should remove the notes from the content</span></dd>
367
+ <script type="text/javascript">moveProgressBar('52.2');</script>
368
+ <dd class="spec passed"><span class="passed_spec_name">should extract the notes</span></dd>
369
+ </dl>
370
+ </div>
371
+ <div class="example_group">
372
+ <dl>
373
+ <dt id="example_group_16">Keydown::Slide with an image for a full-bleed background with a Flickr attribution when generating HTML</dt>
374
+ <script type="text/javascript">moveProgressBar('53.2');</script>
375
+ <dd class="spec passed"><span class="passed_spec_name">should assign the classname(s) to the section</span></dd>
376
+ <script type="text/javascript">moveProgressBar('54.1');</script>
377
+ <dd class="spec passed"><span class="passed_spec_name">should convert the content via Markdown</span></dd>
378
+ <script type="text/javascript">moveProgressBar('55.0');</script>
379
+ <dd class="spec passed"><span class="passed_spec_name">should not include the notes in the HTML</span></dd>
380
+ <script type="text/javascript">moveProgressBar('55.9');</script>
381
+ <dd class="spec passed"><span class="passed_spec_name">should remove any declaration of a background image</span></dd>
382
+ <script type="text/javascript">moveProgressBar('56.8');</script>
383
+ <dd class="spec passed"><span class="passed_spec_name">should save off the background image info for use when generating the HTML</span></dd>
384
+ <script type="text/javascript">moveProgressBar('57.7');</script>
385
+ <dd class="spec passed"><span class="passed_spec_name">should add the full-background class to the containing div</span></dd>
386
+ <script type="text/javascript">moveProgressBar('58.7');</script>
387
+ <dd class="spec passed"><span class="passed_spec_name">should add the background image class to the containing div</span></dd>
388
+ </dl>
389
+ </div>
390
+ <div class="example_group">
391
+ <dl>
392
+ <dt id="example_group_17">Keydown::Slide with an image for a full-bleed background with a Flickr attribution when generating HTML it makes an attribution element that</dt>
393
+ <script type="text/javascript">moveProgressBar('59.6');</script>
394
+ <dd class="spec passed"><span class="passed_spec_name">should have the specified CSS class</span></dd>
395
+ <script type="text/javascript">moveProgressBar('60.5');</script>
396
+ <dd class="spec passed"><span class="passed_spec_name">should have the specified text</span></dd>
397
+ <script type="text/javascript">moveProgressBar('61.4');</script>
398
+ <dd class="spec passed"><span class="passed_spec_name">should have the specified link</span></dd>
399
+ </dl>
400
+ </div>
401
+ <div class="example_group">
402
+ <dl>
403
+ <dt id="example_group_18">Keydown::SlideDeck with a title when building slides</dt>
404
+ <script type="text/javascript">moveProgressBar('62.3');</script>
405
+ <dd class="spec passed"><span class="passed_spec_name">should find the document's title</span></dd>
406
+ <script type="text/javascript">moveProgressBar('63.3');</script>
407
+ <dd class="spec passed"><span class="passed_spec_name">should find all the slides in the markdown</span></dd>
408
+ </dl>
409
+ </div>
410
+ <div class="example_group">
411
+ <dl>
412
+ <dt id="example_group_19">Keydown::SlideDeck with a title when generating HTML</dt>
413
+ <script type="text/javascript">moveProgressBar('64.2');</script>
414
+ <dd class="spec passed"><span class="passed_spec_name">should set the document's title</span></dd>
415
+ <script type="text/javascript">moveProgressBar('65.1');</script>
416
+ <dd class="spec passed"><span class="passed_spec_name">should generate the correct number of slides</span></dd>
417
+ <script type="text/javascript">moveProgressBar('66.0');</script>
418
+ <dd class="spec passed"><span class="passed_spec_name">should set the CSS classnames of each slide</span></dd>
419
+ </dl>
420
+ </div>
421
+ <div class="example_group">
422
+ <dl>
423
+ <dt id="example_group_20">Keydown::SlideDeck with a background image when building slides</dt>
424
+ <script type="text/javascript">moveProgressBar('66.9');</script>
425
+ <dd class="spec passed"><span class="passed_spec_name">should find the document's title</span></dd>
426
+ <script type="text/javascript">moveProgressBar('67.8');</script>
427
+ <dd class="spec passed"><span class="passed_spec_name">should find all the slides in the markdown</span></dd>
428
+ </dl>
429
+ </div>
430
+ <div class="example_group">
431
+ <dl>
432
+ <dt id="example_group_21">Keydown::SlideDeck with a background image when generating HTML</dt>
433
+ <script type="text/javascript">moveProgressBar('68.8');</script>
434
+ <dd class="spec passed"><span class="passed_spec_name">should add the full-bleed background CSS classname to any slide that specifies a background</span></dd>
435
+ <script type="text/javascript">moveProgressBar('69.7');</script>
436
+ <dd class="spec passed"><span class="passed_spec_name">should add a custom classname to a slide that specifies a background</span></dd>
437
+ </dl>
438
+ </div>
439
+ <div class="example_group">
440
+ <dl>
441
+ <dt id="example_group_22">Keydown generate command</dt>
442
+ <script type="text/javascript">moveProgressBar('70.6');</script>
443
+ <dd class="spec passed"><span class="passed_spec_name">should generate a directory for the presentation</span></dd>
444
+ <script type="text/javascript">moveProgressBar('71.5');</script>
445
+ <dd class="spec passed"><span class="passed_spec_name">should generate a sample Markdown file</span></dd>
446
+ <script type="text/javascript">moveProgressBar('72.4');</script>
447
+ <dd class="spec passed"><span class="passed_spec_name">should create the support directories for the presentation</span></dd>
448
+ <script type="text/javascript">moveProgressBar('73.3');</script>
449
+ <dd class="spec passed"><span class="passed_spec_name">should copy the HTML5 Rocks default CSS file</span></dd>
450
+ <script type="text/javascript">moveProgressBar('74.3');</script>
451
+ <dd class="spec passed"><span class="passed_spec_name">should copy the HTML5 Rocks default JS file</span></dd>
452
+ </dl>
453
+ </div>
454
+ <div class="example_group">
455
+ <dl>
456
+ <dt id="example_group_23">Keydown `slides` when file cannot be found</dt>
457
+ <script type="text/javascript">moveProgressBar('75.2');</script>
458
+ <dd class="spec passed"><span class="passed_spec_name">should warn the user</span></dd>
459
+ <script type="text/javascript">moveProgressBar('76.1');</script>
460
+ <dd class="spec passed"><span class="passed_spec_name">should not write out a file</span></dd>
461
+ </dl>
462
+ </div>
463
+ <div class="example_group">
464
+ <dl>
465
+ <dt id="example_group_24">Keydown `slides` with defaults should generate an html file that</dt>
466
+ <script type="text/javascript">moveProgressBar('77.0');</script>
467
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct file name</span></dd>
468
+ <script type="text/javascript">moveProgressBar('77.9');</script>
469
+ <dd class="spec passed"><span class="passed_spec_name">should set the document's title</span></dd>
470
+ <script type="text/javascript">moveProgressBar('78.8');</script>
471
+ <dd class="spec passed"><span class="passed_spec_name">should generate the correct number of slides</span></dd>
472
+ <script type="text/javascript">moveProgressBar('79.8');</script>
473
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks CSS only once</span></dd>
474
+ <script type="text/javascript">moveProgressBar('80.7');</script>
475
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks JavaScript only once</span></dd>
476
+ </dl>
477
+ </div>
478
+ <div class="example_group">
479
+ <dl>
480
+ <dt id="example_group_25">Keydown `slides` with defaults should generate an html file that should have one slide that</dt>
481
+ <script type="text/javascript">moveProgressBar('81.6');</script>
482
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct css class(es)</span></dd>
483
+ <script type="text/javascript">moveProgressBar('82.5');</script>
484
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct content</span></dd>
485
+ </dl>
486
+ </div>
487
+ <div class="example_group">
488
+ <dl>
489
+ <dt id="example_group_26">Keydown `slides` with defaults should add an .md extention if one isn't specified</dt>
490
+ <script type="text/javascript">moveProgressBar('83.4');</script>
491
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct file name</span></dd>
492
+ <script type="text/javascript">moveProgressBar('84.4');</script>
493
+ <dd class="spec passed"><span class="passed_spec_name">should set the document's title</span></dd>
494
+ <script type="text/javascript">moveProgressBar('85.3');</script>
495
+ <dd class="spec passed"><span class="passed_spec_name">should generate the correct number of slides</span></dd>
496
+ <script type="text/javascript">moveProgressBar('86.2');</script>
497
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks CSS only once</span></dd>
498
+ <script type="text/javascript">moveProgressBar('87.1');</script>
499
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks JavaScript only once</span></dd>
500
+ </dl>
501
+ </div>
502
+ <div class="example_group">
503
+ <dl>
504
+ <dt id="example_group_27">Keydown `slides` with directory tree with custom CSS &amp; JS</dt>
505
+ <script type="text/javascript">moveProgressBar('88.0');</script>
506
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct file name</span></dd>
507
+ <script type="text/javascript">moveProgressBar('88.9');</script>
508
+ <dd class="spec passed"><span class="passed_spec_name">should set the document's title</span></dd>
509
+ <script type="text/javascript">moveProgressBar('89.9');</script>
510
+ <dd class="spec passed"><span class="passed_spec_name">should generate the correct number of slides</span></dd>
511
+ <script type="text/javascript">moveProgressBar('90.8');</script>
512
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks CSS only once</span></dd>
513
+ <script type="text/javascript">moveProgressBar('91.7');</script>
514
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks JavaScript only once</span></dd>
515
+ <script type="text/javascript">moveProgressBar('92.6');</script>
516
+ <dd class="spec passed"><span class="passed_spec_name">should include any custom CSS file from the css directory</span></dd>
517
+ <script type="text/javascript">moveProgressBar('93.5');</script>
518
+ <dd class="spec passed"><span class="passed_spec_name">should include any custom JavaScript files from the js directory</span></dd>
519
+ </dl>
520
+ </div>
521
+ <div class="example_group">
522
+ <dl>
523
+ <dt id="example_group_28">Keydown `slides` for a presentation that has background images</dt>
524
+ <script type="text/javascript">moveProgressBar('94.4');</script>
525
+ <dd class="spec passed"><span class="passed_spec_name">should have the correct file name</span></dd>
526
+ <script type="text/javascript">moveProgressBar('95.4');</script>
527
+ <dd class="spec passed"><span class="passed_spec_name">should set the document's title</span></dd>
528
+ <script type="text/javascript">moveProgressBar('96.3');</script>
529
+ <dd class="spec passed"><span class="passed_spec_name">should generate the correct number of slides</span></dd>
530
+ <script type="text/javascript">moveProgressBar('97.2');</script>
531
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks CSS only once</span></dd>
532
+ <script type="text/javascript">moveProgressBar('98.1');</script>
533
+ <dd class="spec passed"><span class="passed_spec_name">should include the HTML5 Rocks JavaScript only once</span></dd>
534
+ <script type="text/javascript">moveProgressBar('99.0');</script>
535
+ <dd class="spec passed"><span class="passed_spec_name">should add the keydown.css file (which has the backgrounds) to the css directory</span></dd>
536
+ <script type="text/javascript">moveProgressBar('100.0');</script>
537
+ <dd class="spec passed"><span class="passed_spec_name">should add the keydown.css file to the HTML file</span></dd>
538
+ </dl>
539
+ </div>
540
+ <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>3.964342 seconds</strong>";</script>
541
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "109 examples, 0 failures";</script>
542
+ </div>
543
+ </div>
544
+ </body>
545
+ </html>
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'rubygems'
4
+ require 'keydown'
5
+ require 'rspec'
6
+ require 'pp'
7
+
8
+ require 'nokogiri'
9
+ require 'tmpdir'
10
+
11
+ def capture_output
12
+ output = StringIO.new
13
+ $stdout = output
14
+ yield
15
+ output.string
16
+ ensure
17
+ $stdout = STDOUT
18
+ end
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Keydown do
4
+ before :each do
5
+ @tmp_dir = "#{Dir.tmpdir}/keydown"
6
+ FileUtils.rm_r @tmp_dir if File.exists?(@tmp_dir)
7
+ FileUtils.mkdir_p @tmp_dir
8
+
9
+ @thor = Thor.new
10
+ end
11
+
12
+ describe "generate command" do
13
+ before :each do
14
+ capture_output do
15
+ Dir.chdir @tmp_dir do
16
+ @thor.invoke Keydown::Tasks, "generate", "sample"
17
+ end
18
+ end
19
+ end
20
+
21
+ it "should generate a directory for the presentation" do
22
+ Dir.chdir "#{@tmp_dir}" do
23
+ File.directory?('sample').should be_true
24
+ end
25
+ end
26
+
27
+ it "should generate a sample Markdown file" do
28
+ Dir.chdir "#{@tmp_dir}/sample" do
29
+ File.exist?("sample.md").should be_true
30
+ end
31
+ end
32
+
33
+ it "should create the support directories for the presentation" do
34
+ Dir.chdir "#{@tmp_dir}/sample" do
35
+ File.directory?("css").should be_true
36
+ File.directory?("images").should be_true
37
+ File.directory?("js").should be_true
38
+ end
39
+ end
40
+
41
+ it "should copy the HTML5 Rocks default CSS file" do
42
+ File.exist?("#{@tmp_dir}/sample/css/rocks.css").should be_true
43
+ end
44
+
45
+ it "should copy the HTML5 Rocks default JS file" do
46
+ File.exist?("#{@tmp_dir}/sample/js/rocks.js").should be_true
47
+ end
48
+
49
+ end
50
+ end