-
Notifications
You must be signed in to change notification settings - Fork 0
/
m.html
530 lines (487 loc) · 24.8 KB
/
m.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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>m.rb</title>
<link rel="stylesheet" href="http://jashkenas.github.com/docco/resources/docco.css">
</head>
<body>
<div id='container'>
<div id="background"></div>
<div id="jump_to">
Jump To …
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="m.html">m.rb</a>
<a class="source" href="m/test_collection.html">test_collection.rb</a>
<a class="source" href="m/test_method.html">test_method.rb</a>
</div>
</div>
</div>
<table cellspacing=0 cellpadding=0>
<thead>
<tr>
<th class=docs><h1>m.rb</h1></th>
<th class=code></th>
</tr>
</thead>
<tbody>
<tr id='section-Install'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-Install">¶</a>
</div>
<p><code>m</code> stands for metal, which is a better test/unit test runner that can run
tests by line number.</p>
<p><a href="http://travis-ci.org/qrush/m"><img src="https://secure.travis-ci.org/qrush/m.png" alt="m ci" /></a></p>
<p><img src="https://raw.github.com/qrush/m/master/rush.jpg" alt="Rush is a heavy metal band. Look it up on Wikipedia." /></p>
<p><sub><a href="http://www.flickr.com/photos/8507625@N02/3468299995/">Rush at the Bristol Colston Hall May 1979</a></sub></p>
<h2>Install</h2>
<p>Install via:</p>
<pre><code>gem install m
</code></pre>
<p>If you’re using Bundler, you’ll need to include it in your Gemfile. Toss it into the <code>test</code> group:</p>
<pre><code>group :test do
gem 'm', '~> 1.1'
end
</code></pre>
<p>Developing a RubyGem? Add <code>m</code> as a development dependency.</p>
<pre><code>Gem::Specification.new do |gem|
# ...
gem.add_development_dependency "m", "~> 1.1"
end
</code></pre>
<p><code>m</code> is Ruby 1.9+ only. Sorry, but <code>method_source</code>, <code>sourcify</code>, and <code>ruby_parser</code>
all have trouble with 1.8 so I’m giving up and only supporting 1.9 for now.
Patches are welcome!</p>
<h2>Usage</h2>
<p>Basically, I was sick of using the <code>-n</code> flag to grab one test to run. Instead, I
prefer how RSpec’s test runner allows tests to be run by line number.</p>
<p>Given this file:</p>
<pre><code>$ cat -n test/example_test.rb
1 require 'test/unit'
2
3 class ExampleTest < Test::Unit::TestCase
4 def test_apple
5 assert_equal 1, 1
6 end
7
8 def test_banana
9 assert_equal 1, 1
10 end
11 end
</code></pre>
<p>You can run a test by line number, using format <code>m TEST_FILE:LINE_NUMBER_OF_TEST</code>:</p>
<pre><code>$ m test/example_test.rb:4
Run options: -n /test_apple/
# Running tests:
.
Finished tests in 0.000525s, 1904.7619 tests/s, 1904.7619 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
</code></pre>
<p>Hit the wrong line number? No problem, <code>m</code> helps you out:</p>
<pre><code>$ m test/example_test.rb:2
No tests found on line 2. Valid tests to run:
test_apple: m test/examples/test_unit_example_test.rb:4
test_banana: m test/examples/test_unit_example_test.rb:8
</code></pre>
<p>Want to run the whole test? Just leave off the line number.</p>
<pre><code>$ m test/example_test.rb
Run options:
# Running tests:
..
Finished tests in 0.001293s, 1546.7904 tests/s, 3093.5808 assertions/s.
1 tests, 2 assertions, 0 failures, 0 errors, 0 skips
</code></pre>
<h3>Supports</h3>
<p><code>m</code> works with a few Ruby test frameworks:</p>
<ul>
<li><code>Test::Unit</code></li>
<li><code>ActiveSupport::TestCase</code></li>
<li><code>MiniTest::Unit::TestCase</code></li>
</ul>
<h2>License</h2>
<p>This gem is MIT licensed, please see <code>LICENSE</code> for more information.</p>
</td>
<td class=code>
<div class='highlight'><pre></pre></div>
</td>
</tr>
<tr id='section-M,_your_metal_test_runner'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-M,_your_metal_test_runner">¶</a>
</div>
<h2>M, your metal test runner</h2>
<p>Maybe this gem should have a longer name? Metal?</p>
</td>
<td class=code>
<div class='highlight'><pre><span class="k">module</span> <span class="nn">M</span>
<span class="no">VERSION</span> <span class="o">=</span> <span class="s2">"1.1.0"</span></pre></div>
</td>
</tr>
<tr id='section-3'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-3">¶</a>
</div>
<p>Accept arguments coming from bin/m and run tests.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">run</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span>
<span class="no">Runner</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span><span class="o">.</span><span class="n">run</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-Runner_is_in_charge_of_running_your_tests.'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-Runner_is_in_charge_of_running_your_tests.">¶</a>
</div>
<h2>Runner is in charge of running your tests.</h2>
<p>Instead of slamming all of this junk in an <code>M</code> class, it’s here instead.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">class</span> <span class="nc">Runner</span>
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">argv</span><span class="p">)</span>
<span class="vi">@argv</span> <span class="o">=</span> <span class="n">argv</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-5'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-5">¶</a>
</div>
<p>There’s two steps to running our tests:
1. Parsing the given input for the tests we need to find (or groups of tests)
2. Run those tests we found that match what you wanted</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">def</span> <span class="nf">run</span>
<span class="n">parse</span>
<span class="n">execute</span>
<span class="k">end</span>
<span class="kp">private</span>
<span class="k">def</span> <span class="nf">parse</span></pre></div>
</td>
</tr>
<tr id='section-6'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-6">¶</a>
</div>
<p>With no arguments,</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">if</span> <span class="vi">@argv</span><span class="o">.</span><span class="n">empty?</span></pre></div>
</td>
</tr>
<tr id='section-7'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-7">¶</a>
</div>
<p>Just shell out to <code>rake test</code>.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="nb">exec</span> <span class="s2">"rake test"</span>
<span class="k">else</span></pre></div>
</td>
</tr>
<tr id='section-8'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-8">¶</a>
</div>
<p>Parse out ARGV, it should be coming in in a format like <code>test/test_file.rb:9</code></p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="vi">@file</span><span class="p">,</span> <span class="n">line</span> <span class="o">=</span> <span class="vi">@argv</span><span class="o">.</span><span class="n">first</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">':'</span><span class="p">)</span>
<span class="vi">@line</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">to_i</span></pre></div>
</td>
</tr>
<tr id='section-9'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-9">¶</a>
</div>
<p>If this file is a directory, not a file, run the tests inside of this directory</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">if</span> <span class="no">Dir</span><span class="o">.</span><span class="n">exist?</span><span class="p">(</span><span class="vi">@file</span><span class="p">)</span></pre></div>
</td>
</tr>
<tr id='section-10'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-10">¶</a>
</div>
<p>Make a new rake test task with a hopefully unique name, and run every test looking file in it</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="nb">require</span> <span class="s2">"rake/testtask"</span>
<span class="no">Rake</span><span class="o">::</span><span class="no">TestTask</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="ss">:m_custom</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">t</span><span class="o">|</span>
<span class="n">t</span><span class="o">.</span><span class="n">libs</span> <span class="o"><<</span> <span class="s1">'test'</span>
<span class="n">t</span><span class="o">.</span><span class="n">pattern</span> <span class="o">=</span> <span class="s2">"</span><span class="si">#{</span><span class="vi">@file</span><span class="si">}</span><span class="s2">/*test*.rb"</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-11'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-11">¶</a>
</div>
<p>Invoke the rake task and exit, hopefully it’ll work!</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="no">Rake</span><span class="o">::</span><span class="no">Task</span><span class="o">[</span><span class="s1">'m_custom'</span><span class="o">].</span><span class="n">invoke</span>
<span class="nb">exit</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">execute</span></pre></div>
</td>
</tr>
<tr id='section-12'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-12">¶</a>
</div>
<p>Locate tests to run that may be inside of this line. There could be more than one!</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">tests_to_run</span> <span class="o">=</span> <span class="n">tests</span><span class="o">.</span><span class="n">within</span><span class="p">(</span><span class="vi">@line</span><span class="p">)</span></pre></div>
</td>
</tr>
<tr id='section-13'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-13">¶</a>
</div>
<p>If we found any tests,</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">if</span> <span class="n">tests_to_run</span><span class="o">.</span><span class="n">size</span> <span class="o">></span> <span class="mi">0</span></pre></div>
</td>
</tr>
<tr id='section-14'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-14">¶</a>
</div>
<p>assemble the regexp to run these tests,</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">test_names</span> <span class="o">=</span> <span class="n">tests_to_run</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="o">&</span><span class="ss">:name</span><span class="p">)</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s1">'|'</span><span class="p">)</span></pre></div>
</td>
</tr>
<tr id='section-15'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-15">¶</a>
</div>
<p>set up the args needed for the runner</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">test_arguments</span> <span class="o">=</span> <span class="o">[</span><span class="s2">"-n"</span><span class="p">,</span> <span class="s2">"/(</span><span class="si">#{</span><span class="n">test_names</span><span class="si">}</span><span class="s2">)/"</span><span class="o">]</span></pre></div>
</td>
</tr>
<tr id='section-16'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-16">¶</a>
</div>
<p>directly run the tests from here and exit with the status of the tests passing or failing</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">if</span> <span class="n">defined?</span><span class="p">(</span><span class="no">Test</span><span class="p">)</span>
<span class="nb">exit</span> <span class="no">Test</span><span class="o">::</span><span class="no">Unit</span><span class="o">::</span><span class="no">AutoRunner</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="kp">false</span><span class="p">,</span> <span class="kp">nil</span><span class="p">,</span> <span class="n">test_arguments</span><span class="p">)</span>
<span class="k">elsif</span> <span class="n">defined?</span><span class="p">(</span><span class="no">MiniTest</span><span class="p">)</span>
<span class="nb">exit</span> <span class="no">MiniTest</span><span class="o">::</span><span class="no">Unit</span><span class="o">.</span><span class="n">runner</span><span class="o">.</span><span class="n">run</span> <span class="n">test_arguments</span>
<span class="k">else</span>
<span class="n">not_supported</span>
<span class="k">end</span>
<span class="k">else</span></pre></div>
</td>
</tr>
<tr id='section-17'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-17">¶</a>
</div>
<p>Otherwise we found no tests on this line, so you need to pick one.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">message</span> <span class="o">=</span> <span class="s2">"No tests found on line </span><span class="si">#{</span><span class="vi">@line</span><span class="si">}</span><span class="s2">. Valid tests to run:</span><span class="se">\n\n</span><span class="s2">"</span></pre></div>
</td>
</tr>
<tr id='section-18'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-18">¶</a>
</div>
<p>For every test ordered by line number,
spit out the test name and line number where it starts,</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">tests</span><span class="o">.</span><span class="n">by_line_number</span> <span class="k">do</span> <span class="o">|</span><span class="nb">test</span><span class="o">|</span>
<span class="n">message</span> <span class="o"><<</span> <span class="s2">"</span><span class="si">#{</span><span class="nb">sprintf</span><span class="p">(</span><span class="s2">"%0</span><span class="si">#{</span><span class="n">tests</span><span class="o">.</span><span class="n">column_size</span><span class="si">}</span><span class="s2">s"</span><span class="p">,</span> <span class="nb">test</span><span class="o">.</span><span class="n">name</span><span class="p">)</span><span class="si">}</span><span class="s2">: m </span><span class="si">#{</span><span class="vi">@file</span><span class="si">}</span><span class="s2">:</span><span class="si">#{</span><span class="nb">test</span><span class="o">.</span><span class="n">start_line</span><span class="si">}</span><span class="se">\n</span><span class="s2">"</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-19'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-19">¶</a>
</div>
<p>fail like a good unix process should.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="nb">abort</span> <span class="n">message</span>
<span class="k">end</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-20'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-20">¶</a>
</div>
<p>Finds all test suites in this test file, with test methods included.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">def</span> <span class="nf">suites</span></pre></div>
</td>
</tr>
<tr id='section-21'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-21">¶</a>
</div>
<p>Since we’re not using <code>ruby -Itest -Ilib</code> to run the tests, we need to add this directory to the <code>LOAD_PATH</code></p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="vg">$:</span><span class="o">.</span><span class="n">unshift</span> <span class="s2">"./test"</span><span class="p">,</span> <span class="s2">"./lib"</span>
<span class="k">begin</span></pre></div>
</td>
</tr>
<tr id='section-22'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-22">¶</a>
</div>
<p>Fire up this Ruby file. Let’s hope it actually has tests.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="nb">load</span> <span class="vi">@file</span>
<span class="k">rescue</span> <span class="no">LoadError</span> <span class="o">=></span> <span class="n">e</span></pre></div>
</td>
</tr>
<tr id='section-23'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-23">¶</a>
</div>
<p>Fail with a happier error message instead of spitting out a backtrace from this gem</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="nb">abort</span> <span class="s2">"Failed loading test file:</span><span class="se">\n</span><span class="si">#{</span><span class="n">e</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-24'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-24">¶</a>
</div>
<p>Figure out what test framework we’re using</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">if</span> <span class="n">defined?</span><span class="p">(</span><span class="no">Test</span><span class="p">)</span>
<span class="n">suites</span> <span class="o">=</span> <span class="no">Test</span><span class="o">::</span><span class="no">Unit</span><span class="o">::</span><span class="no">TestCase</span><span class="o">.</span><span class="n">test_suites</span>
<span class="k">elsif</span> <span class="n">defined?</span><span class="p">(</span><span class="no">MiniTest</span><span class="p">)</span>
<span class="n">suites</span> <span class="o">=</span> <span class="no">MiniTest</span><span class="o">::</span><span class="no">Unit</span><span class="o">::</span><span class="no">TestCase</span><span class="o">.</span><span class="n">test_suites</span>
<span class="k">else</span>
<span class="n">not_supported</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-25'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-25">¶</a>
</div>
<p>Use some janky internal APIs to group test methods by test suite.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">suites</span><span class="o">.</span><span class="n">inject</span><span class="p">({})</span> <span class="k">do</span> <span class="o">|</span><span class="n">suites</span><span class="p">,</span> <span class="n">suite_class</span><span class="o">|</span></pre></div>
</td>
</tr>
<tr id='section-26'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-26">¶</a>
</div>
<p>End up with a hash of suite class name to an array of test methods, so we can later find them and ignore empty test suites</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">suites</span><span class="o">[</span><span class="n">suite_class</span><span class="o">]</span> <span class="o">=</span> <span class="n">suite_class</span><span class="o">.</span><span class="n">test_methods</span> <span class="k">if</span> <span class="n">suite_class</span><span class="o">.</span><span class="n">test_methods</span><span class="o">.</span><span class="n">size</span> <span class="o">></span> <span class="mi">0</span>
<span class="n">suites</span>
<span class="k">end</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-27'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-27">¶</a>
</div>
<p>Shoves tests together in our custom container and collection classes.
Memoize it since it’s unnecessary to do this more than one for a given file.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">def</span> <span class="nf">tests</span>
<span class="vi">@tests</span> <span class="o">||=</span> <span class="k">begin</span>
<span class="nb">require</span> <span class="s2">"m/test_collection"</span>
<span class="nb">require</span> <span class="s2">"m/test_method"</span></pre></div>
</td>
</tr>
<tr id='section-28'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-28">¶</a>
</div>
<p>With each suite and array of tests,
and with each test method present in this test file,
shove a new test method into this collection.</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="n">suites</span><span class="o">.</span><span class="n">inject</span><span class="p">(</span><span class="no">TestCollection</span><span class="o">.</span><span class="n">new</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">collection</span><span class="p">,</span> <span class="p">(</span><span class="n">suite_class</span><span class="p">,</span> <span class="n">test_methods</span><span class="p">)</span><span class="o">|</span>
<span class="n">test_methods</span><span class="o">.</span><span class="n">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">test_method</span><span class="o">|</span>
<span class="n">collection</span> <span class="o"><<</span> <span class="no">TestMethod</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">suite_class</span><span class="p">,</span> <span class="n">test_method</span><span class="p">)</span>
<span class="k">end</span>
<span class="n">collection</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span></pre></div>
</td>
</tr>
<tr id='section-29'>
<td class=docs>
<div class="pilwrap">
<a class="pilcrow" href="#section-29">¶</a>
</div>
<p>Fail loudly if this isn’t supported</p>
</td>
<td class=code>
<div class='highlight'><pre> <span class="k">def</span> <span class="nf">not_supported</span>
<span class="nb">abort</span> <span class="s2">"This test framework is not supported! Please open up an issue at https://github.com/qrush/m !"</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span></pre></div>
</td>
</tr>
</table>
</div>
</body>