ae_easy-test 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,7 @@
95
95
  </div>
96
96
 
97
97
  <div id="footer">
98
- Generated on Fri Mar 8 17:49:24 2019 by
98
+ Generated on Fri Mar 8 21:06:39 2019 by
99
99
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
100
100
  0.9.18 (ruby-2.5.3).
101
101
  </div>
@@ -107,7 +107,7 @@
107
107
  </div>
108
108
 
109
109
  <div id="footer">
110
- Generated on Fri Mar 8 17:49:24 2019 by
110
+ Generated on Fri Mar 8 21:06:39 2019 by
111
111
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
112
  0.9.18 (ruby-2.5.3).
113
113
  </div>
@@ -186,7 +186,7 @@
186
186
  </div>
187
187
 
188
188
  <div id="footer">
189
- Generated on Fri Mar 8 17:49:25 2019 by
189
+ Generated on Fri Mar 8 21:06:39 2019 by
190
190
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
191
191
  0.9.18 (ruby-2.5.3).
192
192
  </div>
@@ -120,7 +120,7 @@
120
120
 
121
121
  </div>
122
122
  </dt>
123
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
123
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
124
124
 
125
125
  </dl>
126
126
 
@@ -504,7 +504,7 @@
504
504
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_verbose_log'>verbose_log</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_log_caller'>log_caller</span> <span class='op'>=</span> <span class='kw'>nil</span>
505
505
  <span class='id identifier rubyid_log_caller'>log_caller</span> <span class='op'>||=</span> <span class='id identifier rubyid_caller'>caller</span>
506
506
  <span class='id identifier rubyid_caller_infos'>caller_infos</span> <span class='op'>=</span> <span class='id identifier rubyid_log_caller'>log_caller</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>:</span><span class='tstring_end'>&quot;</span></span>
507
- <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nil</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
507
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>nil</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
508
508
  <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_caller_infos'>caller_infos</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_caller_infos'>caller_infos</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> - </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text'>text</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n\n</span><span class='tstring_end'>&quot;</span></span>
509
509
  <span class='kw'>end</span></pre>
510
510
  </td>
@@ -606,7 +606,7 @@
606
606
  </div>
607
607
 
608
608
  <div id="footer">
609
- Generated on Fri Mar 8 17:49:24 2019 by
609
+ Generated on Fri Mar 8 21:06:38 2019 by
610
610
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
611
611
  0.9.18 (ruby-2.5.3).
612
612
  </div>
@@ -491,19 +491,6 @@
491
491
  </li></ul>
492
492
  </div>
493
493
 
494
- </li>
495
-
496
- </ul>
497
- <p class="tag_title">Raises:</p>
498
- <ul class="raise">
499
-
500
- <li>
501
-
502
-
503
- <span class='type'>(<tt>NotImplementedError</tt>)</span>
504
-
505
-
506
-
507
494
  </li>
508
495
 
509
496
  </ul>
@@ -551,14 +538,16 @@
551
538
  155
552
539
  156
553
540
  157
554
- 158</pre>
541
+ 158
542
+ 159</pre>
555
543
  </td>
556
544
  <td>
557
545
  <pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 121</span>
558
546
 
559
547
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_collection_diff'>collection_diff</span> <span class='id identifier rubyid_items_a'>items_a</span><span class='comma'>,</span> <span class='id identifier rubyid_items_b'>items_b</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
560
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Current status WIP, don\&#39;t use it for now.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
561
- <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
548
+ <span class='comment'># TODO: Improve this function
549
+ </span> <span class='comment'>#raise NotImplementedError.new(&#39;Current status WIP, don\&#39;t use it for now.&#39;)
550
+ </span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
562
551
  <span class='label'>exact_match:</span> <span class='kw'>true</span><span class='comma'>,</span>
563
552
  <span class='label'>deep_stringify:</span> <span class='kw'>true</span><span class='comma'>,</span>
564
553
  <span class='label'>sanitize:</span> <span class='kw'>true</span><span class='comma'>,</span>
@@ -805,7 +794,6 @@
805
794
  <pre class="lines">
806
795
 
807
796
 
808
- 180
809
797
  181
810
798
  182
811
799
  183
@@ -821,10 +809,11 @@
821
809
  193
822
810
  194
823
811
  195
824
- 196</pre>
812
+ 196
813
+ 197</pre>
825
814
  </td>
826
815
  <td>
827
- <pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 180</span>
816
+ <pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 181</span>
828
817
 
829
818
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_collection_match?'>collection_match?</span> <span class='id identifier rubyid_fragment'>fragment</span><span class='comma'>,</span> <span class='id identifier rubyid_universe'>universe</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
830
819
  <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -1528,7 +1517,6 @@
1528
1517
  <pre class="lines">
1529
1518
 
1530
1519
 
1531
- 212
1532
1520
  213
1533
1521
  214
1534
1522
  215
@@ -1537,10 +1525,11 @@
1537
1525
  218
1538
1526
  219
1539
1527
  220
1540
- 221</pre>
1528
+ 221
1529
+ 222</pre>
1541
1530
  </td>
1542
1531
  <td>
1543
- <pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 212</span>
1532
+ <pre class="code"><span class="info file"># File 'lib/ae_easy/test/helper.rb', line 213</span>
1544
1533
 
1545
1534
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_match_collections'>match_collections</span> <span class='id identifier rubyid_items_a'>items_a</span><span class='comma'>,</span> <span class='id identifier rubyid_items_b'>items_b</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1546
1535
  <span class='id identifier rubyid_diff'>diff</span> <span class='op'>=</span> <span class='id identifier rubyid_collection_diff'>collection_diff</span><span class='lparen'>(</span>
@@ -1711,7 +1700,7 @@
1711
1700
  </div>
1712
1701
 
1713
1702
  <div id="footer">
1714
- Generated on Fri Mar 8 17:49:24 2019 by
1703
+ Generated on Fri Mar 8 21:06:39 2019 by
1715
1704
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1716
1705
  0.9.18 (ruby-2.5.3).
1717
1706
  </div>
@@ -2483,7 +2483,7 @@ AnswersEngine::Scraper::Executor#find_outputs for details).</p>
2483
2483
  </div>
2484
2484
 
2485
2485
  <div id="footer">
2486
- Generated on Fri Mar 8 17:49:25 2019 by
2486
+ Generated on Fri Mar 8 21:06:39 2019 by
2487
2487
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2488
2488
  0.9.18 (ruby-2.5.3).
2489
2489
  </div>
@@ -227,7 +227,7 @@
227
227
  </div>
228
228
 
229
229
  <div id="footer">
230
- Generated on Fri Mar 8 17:49:24 2019 by
230
+ Generated on Fri Mar 8 21:06:38 2019 by
231
231
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
232
232
  0.9.18 (ruby-2.5.3).
233
233
  </div>
@@ -81,7 +81,7 @@ href="http://rubydoc.org/gems/ae_easy-test/frames">here</a>.</p>
81
81
  </div></div>
82
82
 
83
83
  <div id="footer">
84
- Generated on Fri Mar 8 17:49:24 2019 by
84
+ Generated on Fri Mar 8 21:06:38 2019 by
85
85
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
86
86
  0.9.18 (ruby-2.5.3).
87
87
  </div>
@@ -81,7 +81,7 @@ href="http://rubydoc.org/gems/ae_easy-test/frames">here</a>.</p>
81
81
  </div></div>
82
82
 
83
83
  <div id="footer">
84
- Generated on Fri Mar 8 17:49:24 2019 by
84
+ Generated on Fri Mar 8 21:06:38 2019 by
85
85
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
86
86
  0.9.18 (ruby-2.5.3).
87
87
  </div>
@@ -246,7 +246,7 @@
246
246
 
247
247
  <li class="even ">
248
248
  <div class="item">
249
- <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#match_expected_outputs-class_method" title="AeEasy::Core::Mock::FakeExecutor.match_expected_outputs (method)">match_expected_outputs</a></span>
249
+ <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#match_expected_outputs-instance_method" title="AeEasy::Core::Mock::FakeExecutor#match_expected_outputs (method)">#match_expected_outputs</a></span>
250
250
  <small>AeEasy::Core::Mock::FakeExecutor</small>
251
251
  </div>
252
252
  </li>
@@ -261,6 +261,14 @@
261
261
 
262
262
 
263
263
  <li class="even ">
264
+ <div class="item">
265
+ <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#new_executor-instance_method" title="AeEasy::Core::Mock::FakeExecutor#new_executor (method)">#new_executor</a></span>
266
+ <small>AeEasy::Core::Mock::FakeExecutor</small>
267
+ </div>
268
+ </li>
269
+
270
+
271
+ <li class="odd ">
264
272
  <div class="item">
265
273
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record-instance_method" title="AeEasy::Test::RecordTask#record (method)">#record</a></span>
266
274
  <small>AeEasy::Test::RecordTask</small>
@@ -268,7 +276,7 @@
268
276
  </li>
269
277
 
270
278
 
271
- <li class="odd ">
279
+ <li class="even ">
272
280
  <div class="item">
273
281
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_content-instance_method" title="AeEasy::Test::RecordTask#record_content (method)">#record_content</a></span>
274
282
  <small>AeEasy::Test::RecordTask</small>
@@ -276,7 +284,7 @@
276
284
  </li>
277
285
 
278
286
 
279
- <li class="even ">
287
+ <li class="odd ">
280
288
  <div class="item">
281
289
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_failed_content-instance_method" title="AeEasy::Test::RecordTask#record_failed_content (method)">#record_failed_content</a></span>
282
290
  <small>AeEasy::Test::RecordTask</small>
@@ -284,7 +292,7 @@
284
292
  </li>
285
293
 
286
294
 
287
- <li class="odd ">
295
+ <li class="even ">
288
296
  <div class="item">
289
297
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_file-instance_method" title="AeEasy::Test::RecordTask#record_file (method)">#record_file</a></span>
290
298
  <small>AeEasy::Test::RecordTask</small>
@@ -292,7 +300,7 @@
292
300
  </li>
293
301
 
294
302
 
295
- <li class="even ">
303
+ <li class="odd ">
296
304
  <div class="item">
297
305
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_outputs-instance_method" title="AeEasy::Test::RecordTask#record_outputs (method)">#record_outputs</a></span>
298
306
  <small>AeEasy::Test::RecordTask</small>
@@ -300,7 +308,7 @@
300
308
  </li>
301
309
 
302
310
 
303
- <li class="odd ">
311
+ <li class="even ">
304
312
  <div class="item">
305
313
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_page-instance_method" title="AeEasy::Test::RecordTask#record_page (method)">#record_page</a></span>
306
314
  <small>AeEasy::Test::RecordTask</small>
@@ -308,7 +316,7 @@
308
316
  </li>
309
317
 
310
318
 
311
- <li class="even ">
319
+ <li class="odd ">
312
320
  <div class="item">
313
321
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_pages-instance_method" title="AeEasy::Test::RecordTask#record_pages (method)">#record_pages</a></span>
314
322
  <small>AeEasy::Test::RecordTask</small>
@@ -316,7 +324,7 @@
316
324
  </li>
317
325
 
318
326
 
319
- <li class="odd ">
327
+ <li class="even ">
320
328
  <div class="item">
321
329
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#record_vars-instance_method" title="AeEasy::Test::RecordTask#record_vars (method)">#record_vars</a></span>
322
330
  <small>AeEasy::Test::RecordTask</small>
@@ -324,7 +332,7 @@
324
332
  </li>
325
333
 
326
334
 
327
- <li class="even ">
335
+ <li class="odd ">
328
336
  <div class="item">
329
337
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#root_dir-instance_method" title="AeEasy::Test::RecordTask#root_dir (method)">#root_dir</a></span>
330
338
  <small>AeEasy::Test::RecordTask</small>
@@ -332,7 +340,7 @@
332
340
  </li>
333
341
 
334
342
 
335
- <li class="odd ">
343
+ <li class="even ">
336
344
  <div class="item">
337
345
  <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#root_input_dir-instance_method" title="AeEasy::Core::Mock::FakeExecutor#root_input_dir (method)">#root_input_dir</a></span>
338
346
  <small>AeEasy::Core::Mock::FakeExecutor</small>
@@ -340,7 +348,7 @@
340
348
  </li>
341
349
 
342
350
 
343
- <li class="even ">
351
+ <li class="odd ">
344
352
  <div class="item">
345
353
  <span class='object_link'><a href="AeEasy/Test/Helper.html#sanitize-class_method" title="AeEasy::Test::Helper.sanitize (method)">sanitize</a></span>
346
354
  <small>AeEasy::Test::Helper</small>
@@ -348,7 +356,7 @@
348
356
  </li>
349
357
 
350
358
 
351
- <li class="odd ">
359
+ <li class="even ">
352
360
  <div class="item">
353
361
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#scraper_name-instance_method" title="AeEasy::Test::RecordTask#scraper_name (method)">#scraper_name</a></span>
354
362
  <small>AeEasy::Test::RecordTask</small>
@@ -356,7 +364,7 @@
356
364
  </li>
357
365
 
358
366
 
359
- <li class="even ">
367
+ <li class="odd ">
360
368
  <div class="item">
361
369
  <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#should_match_outputs-instance_method" title="AeEasy::Core::Mock::FakeExecutor#should_match_outputs (method)">#should_match_outputs</a></span>
362
370
  <small>AeEasy::Core::Mock::FakeExecutor</small>
@@ -364,7 +372,7 @@
364
372
  </li>
365
373
 
366
374
 
367
- <li class="odd ">
375
+ <li class="even ">
368
376
  <div class="item">
369
377
  <span class='object_link'><a href="AeEasy/Core/Mock/FakeExecutor.html#should_match_pages-instance_method" title="AeEasy::Core::Mock::FakeExecutor#should_match_pages (method)">#should_match_pages</a></span>
370
378
  <small>AeEasy::Core::Mock::FakeExecutor</small>
@@ -372,7 +380,7 @@
372
380
  </li>
373
381
 
374
382
 
375
- <li class="even ">
383
+ <li class="odd ">
376
384
  <div class="item">
377
385
  <span class='object_link'><a href="AeEasy/Test.html#test_mode%3F-class_method" title="AeEasy::Test.test_mode? (method)">test_mode?</a></span>
378
386
  <small>AeEasy::Test</small>
@@ -380,7 +388,7 @@
380
388
  </li>
381
389
 
382
390
 
383
- <li class="odd ">
391
+ <li class="even ">
384
392
  <div class="item">
385
393
  <span class='object_link'><a href="AeEasy/Core/Plugin/ExecutorBehavior.html#test_mode%3F-instance_method" title="AeEasy::Core::Plugin::ExecutorBehavior#test_mode? (method)">#test_mode?</a></span>
386
394
  <small>AeEasy::Core::Plugin::ExecutorBehavior</small>
@@ -388,7 +396,7 @@
388
396
  </li>
389
397
 
390
398
 
391
- <li class="even ">
399
+ <li class="odd ">
392
400
  <div class="item">
393
401
  <span class='object_link'><a href="AeEasy/Test/RecordTask.html#verbose%3F-instance_method" title="AeEasy::Test::RecordTask#verbose? (method)">#verbose?</a></span>
394
402
  <small>AeEasy::Test::RecordTask</small>
@@ -396,7 +404,7 @@
396
404
  </li>
397
405
 
398
406
 
399
- <li class="odd ">
407
+ <li class="even ">
400
408
  <div class="item">
401
409
  <span class='object_link'><a href="AeEasy/Test.html#verbose_log-class_method" title="AeEasy::Test.verbose_log (method)">verbose_log</a></span>
402
410
  <small>AeEasy::Test</small>
@@ -404,7 +412,7 @@
404
412
  </li>
405
413
 
406
414
 
407
- <li class="even ">
415
+ <li class="odd ">
408
416
  <div class="item">
409
417
  <span class='object_link'><a href="AeEasy/Test.html#verbose_match_diff-class_method" title="AeEasy::Test.verbose_match_diff (method)">verbose_match_diff</a></span>
410
418
  <small>AeEasy::Test</small>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Fri Mar 8 17:49:24 2019 by
103
+ Generated on Fri Mar 8 21:06:38 2019 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.18 (ruby-2.5.3).
106
106
  </div>
@@ -32,7 +32,7 @@ module AeEasy
32
32
  def self.verbose_log message, data = nil, log_caller = nil
33
33
  log_caller ||= caller
34
34
  caller_infos = log_caller.first.split ":"
35
- text = data.nil? ? 'nil' : data.inspect
35
+ text = data.nil? ? 'nil' : JSON.pretty_generate(data)
36
36
  puts "\n#{caller_infos[0]}:#{caller_infos[1]} - #{message}#{text}\n\n"
37
37
  end
38
38
 
@@ -119,7 +119,8 @@ module AeEasy
119
119
  # * `[Array] :items_b` Diff items on `items_b` collection.
120
120
  # * `[Boolean] :match` `true` when all items match else `false`.
121
121
  def self.collection_diff items_a, items_b, opts = {}
122
- raise NotImplementedError.new('Current status WIP, don\'t use it for now.')
122
+ # TODO: Improve this function
123
+ #raise NotImplementedError.new('Current status WIP, don\'t use it for now.')
123
124
  opts = {
124
125
  exact_match: true,
125
126
  deep_stringify: true,
@@ -1,6 +1,6 @@
1
1
  module AeEasy
2
2
  module Test
3
3
  # Gem version
4
- VERSION = "0.0.0"
4
+ VERSION = "0.0.1"
5
5
  end
6
6
  end
@@ -54,7 +54,7 @@ module AeEasy
54
54
  pages: nil,
55
55
  outputs: nil
56
56
  }.merge opts
57
- dir = opts[:input_dir] || expand_relative_input(opts[:rel_dir]) || self.input_dir
57
+ dir = self.input_dir = opts[:input_dir] || expand_relative_input(opts[:rel_dir]) || self.input_dir
58
58
 
59
59
  # Load overrides
60
60
  self.content = opts[:content]
@@ -183,6 +183,13 @@ module AeEasy
183
183
  self
184
184
  end
185
185
 
186
+ # Create an executor based on the current executor type.
187
+ #
188
+ # @return [AeEasy::Core::Mock::FakeExecutor]
189
+ def new_executor
190
+ self.class.new
191
+ end
192
+
186
193
  # Match expected pages.
187
194
  #
188
195
  # @param [Hash] opts ({}) Configuration options.
@@ -214,9 +221,11 @@ module AeEasy
214
221
  opts[:input_dir] ||= input_dir
215
222
 
216
223
  # Expected context
217
- expected = AeEasy::Core::Mock::FakeExecutor.new
224
+ expected_opts = {}.merge opts
225
+ expected_opts[:input_dir] ||= input_dir
226
+ expected = new_executor
218
227
  expected.root_input_dir = root_input_dir
219
- expected.load_expected_pages opts
228
+ expected.load_expected_pages expected_opts
220
229
 
221
230
  # Config skip fields
222
231
  skip_fields = opts[:skip_fields]
@@ -227,12 +236,13 @@ module AeEasy
227
236
  diff = AeEasy::Test::Helper.match_collections(
228
237
  saved_pages,
229
238
  expected.saved_pages,
230
- skip: skip_fields
239
+ skip: skip_fields,
240
+ compare_way: :left
231
241
  )
232
242
  {
233
243
  match: diff[:match],
234
- saved: diff[:diff][:item_a],
235
- expected: diff[:diff][:item_b]
244
+ saved: diff[:diff][:items_a],
245
+ expected: diff[:diff][:items_b]
236
246
  }
237
247
  end
238
248
 
@@ -243,6 +253,7 @@ module AeEasy
243
253
  #
244
254
  # @return [Boolean] `true` when pass, else `false`.
245
255
  def should_match_pages opts = {}
256
+ flush
246
257
  diff = match_expected_pages opts
247
258
  log_caller = opts[:log_caller] || ([] + caller)
248
259
  unless diff[:match]
@@ -271,7 +282,7 @@ module AeEasy
271
282
  # * `[Boolean] match` `true` when match, `false` when diff.
272
283
  # * `[Hash] expected` Non matching expected outputs.
273
284
  # * `[Hash] saved` Non matching saved outputs.
274
- def self.match_expected_outputs opts = {}
285
+ def match_expected_outputs opts = {}
275
286
  opts = {
276
287
  rel_dir: nil,
277
288
  input_dir: nil,
@@ -279,12 +290,13 @@ module AeEasy
279
290
  skip_fields: [],
280
291
  default_skip_fields: true,
281
292
  }.merge opts
282
- opts[:input_dir] ||= input_dir
283
293
 
284
294
  # Expected context
285
- expected = AeEasy::Core::Mock::FakeExecutor.new
295
+ expected_opts = {}.merge opts
296
+ expected_opts[:input_dir] ||= input_dir
297
+ expected = new_executor
286
298
  expected.root_input_dir = root_input_dir
287
- expected.load_expected_outputs opts
299
+ expected.load_expected_outputs expected_opts
288
300
 
289
301
  # Config skip fields
290
302
  skip_fields = opts[:skip_fields]
@@ -295,12 +307,13 @@ module AeEasy
295
307
  diff = AeEasy::Test::Helper.match_collections(
296
308
  saved_outputs,
297
309
  expected.saved_outputs,
298
- skip: skip_fields
310
+ skip: skip_fields,
311
+ compare_way: :left
299
312
  )
300
313
  {
301
314
  match: diff[:match],
302
- saved: diff[:diff][:item_a],
303
- expected: diff[:diff][:item_b]
315
+ saved: diff[:diff][:items_a],
316
+ expected: diff[:diff][:items_b]
304
317
  }
305
318
  end
306
319
 
@@ -311,10 +324,11 @@ module AeEasy
311
324
  #
312
325
  # @return [Boolean] `true` when pass, else `false`.
313
326
  def should_match_outputs opts = {}
327
+ flush
314
328
  diff = match_expected_outputs opts
315
329
  log_caller = opts[:log_caller] || ([] + caller)
316
330
  unless diff[:match]
317
- AeEasy::Test::Helper.verbose_match_diff 'outputs', diff, log_caller
331
+ AeEasy::Test.verbose_match_diff 'outputs', diff, log_caller
318
332
  end
319
333
  diff[:match]
320
334
  end