rspec-core 2.12.2 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +31 -0
- data/README.md +11 -10
- data/features/command_line/example_name_option.feature +6 -10
- data/features/command_line/tag.feature +15 -8
- data/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/features/configuration/failure_exit_code.feature +36 -0
- data/features/configuration/order_and_seed.feature +3 -0
- data/features/configuration/output_stream.feature +24 -0
- data/features/configuration/pattern.feature +30 -0
- data/features/configuration/profile.feature +163 -0
- data/features/configuration/run_all_when_everything_filtered.feature +60 -0
- data/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/features/filtering/exclusion_filters.feature +1 -2
- data/features/formatters/configurable_colors.feature +31 -0
- data/features/step_definitions/additional_cli_steps.rb +21 -0
- data/features/subject/explicit_subject.feature +19 -0
- data/lib/autotest/rspec2.rb +1 -1
- data/lib/rspec/core.rb +1 -2
- data/lib/rspec/core/configuration.rb +33 -3
- data/lib/rspec/core/configuration_options.rb +5 -5
- data/lib/rspec/core/deprecation.rb +1 -1
- data/lib/rspec/core/example.rb +2 -2
- data/lib/rspec/core/example_group.rb +1 -3
- data/lib/rspec/core/formatters/base_text_formatter.rb +93 -27
- data/lib/rspec/core/formatters/documentation_formatter.rb +3 -3
- data/lib/rspec/core/formatters/progress_formatter.rb +3 -3
- data/lib/rspec/core/memoized_helpers.rb +425 -0
- data/lib/rspec/core/metadata.rb +6 -2
- data/lib/rspec/core/option_parser.rb +8 -2
- data/lib/rspec/core/pending.rb +7 -0
- data/lib/rspec/core/shared_context.rb +1 -1
- data/lib/rspec/core/version.rb +1 -1
- data/spec/autotest/failed_results_re_spec.rb +4 -4
- data/spec/autotest/rspec_spec.rb +25 -20
- data/spec/command_line/order_spec.rb +21 -21
- data/spec/rspec/core/command_line_spec.rb +6 -6
- data/spec/rspec/core/configuration_options_spec.rb +86 -72
- data/spec/rspec/core/configuration_spec.rb +161 -156
- data/spec/rspec/core/deprecations_spec.rb +4 -4
- data/spec/rspec/core/drb_command_line_spec.rb +9 -9
- data/spec/rspec/core/drb_options_spec.rb +46 -33
- data/spec/rspec/core/dsl_spec.rb +3 -3
- data/spec/rspec/core/example_group_spec.rb +156 -124
- data/spec/rspec/core/example_spec.rb +68 -52
- data/spec/rspec/core/filter_manager_spec.rb +36 -36
- data/spec/rspec/core/formatters/base_formatter_spec.rb +9 -9
- data/spec/rspec/core/formatters/base_text_formatter_spec.rb +104 -42
- data/spec/rspec/core/formatters/documentation_formatter_spec.rb +4 -4
- data/spec/rspec/core/formatters/helpers_spec.rb +13 -13
- data/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +5 -17
- data/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +159 -44
- data/spec/rspec/core/formatters/html_formatted-1.8.7.html +14 -14
- data/spec/rspec/core/formatters/html_formatted-1.9.2.html +20 -20
- data/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +5 -5
- data/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +159 -44
- data/spec/rspec/core/formatters/html_formatted-1.9.3.html +20 -20
- data/spec/rspec/core/formatters/{html_formatted-1.9.2-jruby.html → html_formatted-2.0.0.html} +24 -18
- data/spec/rspec/core/formatters/html_formatter_spec.rb +9 -5
- data/spec/rspec/core/formatters/json_formatter_spec.rb +9 -9
- data/spec/rspec/core/formatters/progress_formatter_spec.rb +4 -4
- data/spec/rspec/core/formatters/snippet_extractor_spec.rb +3 -3
- data/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +5 -17
- data/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +159 -44
- data/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +16 -16
- data/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +23 -23
- data/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +5 -17
- data/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +159 -44
- data/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +23 -23
- data/spec/rspec/core/formatters/{text_mate_formatted-1.9.2-jruby.html → text_mate_formatted-2.0.0.html} +25 -19
- data/spec/rspec/core/formatters/text_mate_formatter_spec.rb +8 -4
- data/spec/rspec/core/hooks_filtering_spec.rb +16 -16
- data/spec/rspec/core/hooks_spec.rb +11 -11
- data/spec/rspec/core/kernel_extensions_spec.rb +1 -1
- data/spec/rspec/core/memoized_helpers_spec.rb +458 -0
- data/spec/rspec/core/metadata_spec.rb +74 -74
- data/spec/rspec/core/option_parser_spec.rb +27 -27
- data/spec/rspec/core/pending_example_spec.rb +32 -32
- data/spec/rspec/core/project_initializer_spec.rb +8 -8
- data/spec/rspec/core/rake_task_spec.rb +16 -16
- data/spec/rspec/core/reporter_spec.rb +3 -3
- data/spec/rspec/core/resources/formatter_specs.rb +4 -4
- data/spec/rspec/core/ruby_project_spec.rb +4 -2
- data/spec/rspec/core/shared_context_spec.rb +34 -7
- data/spec/rspec/core/shared_example_group_spec.rb +14 -14
- data/spec/rspec/core/world_spec.rb +9 -9
- data/spec/rspec/core_spec.rb +5 -5
- data/spec/spec_helper.rb +4 -0
- data/spec/support/shared_example_groups.rb +4 -4
- data/spec/support/spec_files.rb +2 -2
- metadata +158 -150
- data/lib/rspec/core/let.rb +0 -110
- data/lib/rspec/core/subject.rb +0 -223
- data/spec/rspec/core/let_spec.rb +0 -55
- data/spec/rspec/core/subject_spec.rb +0 -255
@@ -320,14 +320,14 @@ a {
|
|
320
320
|
<div class="failure" id="failure_1">
|
321
321
|
<div class="message"><pre>RSpec::Core::Pending::PendingExampleFixedError</pre></div>
|
322
322
|
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `(root)'
|
323
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `
|
323
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `generated_html'
|
324
324
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
325
325
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
326
326
|
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `Formatters'</pre></div>
|
327
327
|
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">"</span><span class="string">with content that would pass</span><span class="punct">"</span> <span class="keyword">do</span>
|
328
328
|
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
329
329
|
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
|
330
|
-
<span class="linenum">19</span> <span class="number">1</span><span class="punct"
|
330
|
+
<span class="linenum">19</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">1</span><span class="punct">)</span>
|
331
331
|
<span class="linenum">20</span> <span class="keyword">end</span></code></pre>
|
332
332
|
</div>
|
333
333
|
</dd>
|
@@ -357,13 +357,13 @@ expected: 2
|
|
357
357
|
(compared using ==)
|
358
358
|
</pre></div>
|
359
359
|
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:33:in `(root)'
|
360
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `
|
360
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `generated_html'
|
361
361
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
362
362
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
363
363
|
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `Formatters'</pre></div>
|
364
364
|
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">"</span><span class="string">failing spec</span><span class="punct">"</span> <span class="keyword">do</span>
|
365
365
|
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
366
|
-
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct"
|
366
|
+
<span class="offending"><span class="linenum">33</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
|
367
367
|
<span class="linenum">34</span> <span class="keyword">end</span>
|
368
368
|
<span class="linenum">35</span><span class="keyword">end</span></code></pre>
|
369
369
|
</div>
|
@@ -383,7 +383,7 @@ expected: 2
|
|
383
383
|
<div class="message"><pre>foo</pre></div>
|
384
384
|
<div class="backtrace"><pre>(erb):1:in `result'
|
385
385
|
./spec/rspec/core/resources/formatter_specs.rb:41:in `(root)'
|
386
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `
|
386
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `generated_html'
|
387
387
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
388
388
|
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `Formatters'
|
389
389
|
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `Formatters'</pre></div>
|
@@ -319,33 +319,73 @@ a {
|
|
319
319
|
<span class="duration">n.nnnns</span>
|
320
320
|
<div class="failure" id="failure_1">
|
321
321
|
<div class="message"><pre>RSpec::Core::Pending::PendingExampleFixedError</pre></div>
|
322
|
-
<div class="backtrace"><pre>./
|
322
|
+
<div class="backtrace"><pre>./lib/rspec/core/pending.rb:102:in `pending'
|
323
|
+
./spec/rspec/core/resources/formatter_specs.rb:18:in `__script__'
|
323
324
|
kernel/common/eval19.rb:45:in `instance_eval'
|
325
|
+
./lib/rspec/core/example.rb:114:in `run'
|
326
|
+
./lib/rspec/core/example.rb:254:in `with_around_each_hooks'
|
327
|
+
./lib/rspec/core/example.rb:111:in `run'
|
328
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
324
329
|
kernel/bootstrap/array19.rb:18:in `map'
|
330
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
331
|
+
./lib/rspec/core/example_group.rb:369:in `orig_run (run)'
|
332
|
+
./spec/spec_helper.rb:53:in `run'
|
333
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
325
334
|
kernel/bootstrap/array19.rb:18:in `map'
|
335
|
+
./lib/rspec/core/example_group.rb:370:in `orig_run (run)'
|
336
|
+
./spec/spec_helper.rb:53:in `run'
|
337
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
326
338
|
kernel/bootstrap/array19.rb:18:in `map'
|
327
|
-
./
|
328
|
-
|
339
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
340
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
341
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
342
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:37:in `Formatters'
|
343
|
+
./lib/rspec/core/let.rb:93:in `let'
|
329
344
|
kernel/common/hash19.rb:257:in `fetch'
|
330
|
-
./
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
345
|
+
./lib/rspec/core/let.rb:93:in `let'
|
346
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
347
|
+
kernel/common/io.rb:217:in `open'
|
348
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
349
|
+
kernel/common/dir.rb:92:in `chdir'
|
350
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `Formatters'
|
335
351
|
kernel/common/eval19.rb:45:in `instance_eval'
|
352
|
+
./lib/rspec/core/example.rb:114:in `run'
|
353
|
+
./lib/rspec/core/example.rb:179:in `run'
|
354
|
+
./spec/spec_helper.rb:102:in `__script__'
|
336
355
|
kernel/common/eval19.rb:45:in `instance_eval'
|
356
|
+
./spec/spec_helper.rb:59:in `sandboxed'
|
357
|
+
./spec/spec_helper.rb:102:in `__script__'
|
337
358
|
kernel/common/eval19.rb:105:in `instance_exec'
|
359
|
+
./lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
|
360
|
+
./lib/rspec/core/example.rb:247:in `instance_eval_with_args'
|
361
|
+
./lib/rspec/core/hooks.rb:93:in `run'
|
362
|
+
./lib/rspec/core/hooks.rb:91:in `run'
|
363
|
+
./lib/rspec/core/hooks.rb:424:in `run_hook'
|
364
|
+
./lib/rspec/core/example_group.rb:327:in `run_around_each_hooks'
|
365
|
+
./lib/rspec/core/example.rb:256:in `with_around_each_hooks'
|
366
|
+
./lib/rspec/core/example.rb:111:in `run'
|
367
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
338
368
|
kernel/bootstrap/array19.rb:18:in `map'
|
369
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
370
|
+
./lib/rspec/core/example_group.rb:369:in `run'
|
371
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
339
372
|
kernel/bootstrap/array19.rb:18:in `map'
|
373
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
374
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
340
375
|
kernel/bootstrap/array19.rb:18:in `map'
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
376
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
377
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
378
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
379
|
+
./lib/rspec/core/runner.rb:77:in `run'
|
380
|
+
./lib/rspec/core/runner.rb:17:in `autorun'
|
381
|
+
kernel/loader.rb:697:in `run_at_exits'
|
382
|
+
kernel/loader.rb:717:in `epilogue'
|
383
|
+
kernel/loader.rb:850:in `main'</pre></div>
|
384
|
+
<pre class="ruby"><code><span class="linenum">100</span> <span class="ident">teardown_mocks_for_rspec</span>
|
385
|
+
<span class="linenum">101</span> <span class="keyword">end</span>
|
386
|
+
<span class="offending"><span class="linenum">102</span> <span class="keyword">raise</span> <span class="constant">PendingExampleFixedError</span><span class="punct">.</span><span class="ident">new</span> <span class="keyword">if</span> <span class="ident">result</span></span>
|
387
|
+
<span class="linenum">103</span> <span class="keyword">end</span>
|
388
|
+
<span class="linenum">104</span> <span class="keyword">raise</span> <span class="constant">PendingDeclaredInExample</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">message</span><span class="punct">)</span></code></pre>
|
349
389
|
</div>
|
350
390
|
</dd>
|
351
391
|
</dl>
|
@@ -373,32 +413,70 @@ expected: 2
|
|
373
413
|
|
374
414
|
(compared using ==)
|
375
415
|
</pre></div>
|
376
|
-
<div class="backtrace"><pre
|
416
|
+
<div class="backtrace"><pre>/Users/alindeman/workspace/rspec-dev/repos/rspec-expectations/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
|
417
|
+
/Users/alindeman/workspace/rspec-dev/repos/rspec-expectations/lib/rspec/expectations/handler.rb:31:in `handle_matcher'
|
418
|
+
/Users/alindeman/workspace/rspec-dev/repos/rspec-expectations/lib/rspec/expectations/expectation_target.rb:34:in `to'
|
419
|
+
./spec/rspec/core/resources/formatter_specs.rb:33:in `__script__'
|
377
420
|
kernel/common/eval19.rb:45:in `instance_eval'
|
421
|
+
./lib/rspec/core/example.rb:114:in `run'
|
422
|
+
./lib/rspec/core/example.rb:254:in `with_around_each_hooks'
|
423
|
+
./lib/rspec/core/example.rb:111:in `run'
|
424
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
378
425
|
kernel/bootstrap/array19.rb:18:in `map'
|
426
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
427
|
+
./lib/rspec/core/example_group.rb:369:in `orig_run (run)'
|
428
|
+
./spec/spec_helper.rb:53:in `run'
|
429
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
379
430
|
kernel/bootstrap/array19.rb:18:in `map'
|
380
|
-
./
|
381
|
-
|
431
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
432
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
433
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
434
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:37:in `Formatters'
|
435
|
+
./lib/rspec/core/let.rb:93:in `let'
|
382
436
|
kernel/common/hash19.rb:257:in `fetch'
|
383
|
-
./
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
437
|
+
./lib/rspec/core/let.rb:93:in `let'
|
438
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
439
|
+
kernel/common/io.rb:217:in `open'
|
440
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
441
|
+
kernel/common/dir.rb:92:in `chdir'
|
442
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `Formatters'
|
388
443
|
kernel/common/eval19.rb:45:in `instance_eval'
|
444
|
+
./lib/rspec/core/example.rb:114:in `run'
|
445
|
+
./lib/rspec/core/example.rb:179:in `run'
|
446
|
+
./spec/spec_helper.rb:102:in `__script__'
|
389
447
|
kernel/common/eval19.rb:45:in `instance_eval'
|
448
|
+
./spec/spec_helper.rb:59:in `sandboxed'
|
449
|
+
./spec/spec_helper.rb:102:in `__script__'
|
390
450
|
kernel/common/eval19.rb:105:in `instance_exec'
|
451
|
+
./lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
|
452
|
+
./lib/rspec/core/example.rb:247:in `instance_eval_with_args'
|
453
|
+
./lib/rspec/core/hooks.rb:93:in `run'
|
454
|
+
./lib/rspec/core/hooks.rb:91:in `run'
|
455
|
+
./lib/rspec/core/hooks.rb:424:in `run_hook'
|
456
|
+
./lib/rspec/core/example_group.rb:327:in `run_around_each_hooks'
|
457
|
+
./lib/rspec/core/example.rb:256:in `with_around_each_hooks'
|
458
|
+
./lib/rspec/core/example.rb:111:in `run'
|
459
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
391
460
|
kernel/bootstrap/array19.rb:18:in `map'
|
461
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
462
|
+
./lib/rspec/core/example_group.rb:369:in `run'
|
463
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
392
464
|
kernel/bootstrap/array19.rb:18:in `map'
|
465
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
466
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
393
467
|
kernel/bootstrap/array19.rb:18:in `map'
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
468
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
469
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
470
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
471
|
+
./lib/rspec/core/runner.rb:77:in `run'
|
472
|
+
./lib/rspec/core/runner.rb:17:in `autorun'
|
473
|
+
kernel/loader.rb:697:in `run_at_exits'
|
474
|
+
kernel/loader.rb:717:in `epilogue'
|
475
|
+
kernel/loader.rb:850:in `main'</pre></div>
|
476
|
+
<pre class="ruby"><code><span class="linenum">31</span> <span class="keyword">end</span>
|
477
|
+
<span class="linenum">32</span>
|
478
|
+
<span class="offending"><span class="linenum">33</span> <span class="keyword">raise</span><span class="punct">(</span><span class="constant">RSpec</span><span class="punct">::</span><span class="constant">Expectations</span><span class="punct">::</span><span class="constant">ExpectationNotMetError</span><span class="punct">.</span><span class="ident">new</span><span class="punct">(</span><span class="ident">message</span><span class="punct">))</span></span>
|
479
|
+
<span class="linenum">34</span> <span class="keyword">end</span></code></pre>
|
402
480
|
</div>
|
403
481
|
</dd>
|
404
482
|
</dl>
|
@@ -417,28 +495,64 @@ kernel/loader.rb:849:in `main'</pre></div>
|
|
417
495
|
<div class="backtrace"><pre>(erb):1:in `__script__'
|
418
496
|
kernel/common/block_environment.rb:75:in `call_on_instance'
|
419
497
|
kernel/common/eval.rb:75:in `eval'
|
420
|
-
/Users/alindeman/.rvm/rubies/rbx-
|
498
|
+
/Users/alindeman/.rvm/rubies/rbx-2.0.0-rc1/lib/19/erb.rb:838:in `result'
|
421
499
|
./spec/rspec/core/resources/formatter_specs.rb:41:in `__script__'
|
422
500
|
kernel/common/eval19.rb:45:in `instance_eval'
|
501
|
+
./lib/rspec/core/example.rb:114:in `run'
|
502
|
+
./lib/rspec/core/example.rb:254:in `with_around_each_hooks'
|
503
|
+
./lib/rspec/core/example.rb:111:in `run'
|
504
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
423
505
|
kernel/bootstrap/array19.rb:18:in `map'
|
506
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
507
|
+
./lib/rspec/core/example_group.rb:369:in `orig_run (run)'
|
508
|
+
./spec/spec_helper.rb:53:in `run'
|
509
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
424
510
|
kernel/bootstrap/array19.rb:18:in `map'
|
425
|
-
./
|
426
|
-
|
511
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
512
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
513
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
514
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:37:in `Formatters'
|
515
|
+
./lib/rspec/core/let.rb:93:in `let'
|
427
516
|
kernel/common/hash19.rb:257:in `fetch'
|
428
|
-
./
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
517
|
+
./lib/rspec/core/let.rb:93:in `let'
|
518
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
519
|
+
kernel/common/io.rb:217:in `open'
|
520
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:59:in `Formatters'
|
521
|
+
kernel/common/dir.rb:92:in `chdir'
|
522
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `Formatters'
|
433
523
|
kernel/common/eval19.rb:45:in `instance_eval'
|
524
|
+
./lib/rspec/core/example.rb:114:in `run'
|
525
|
+
./lib/rspec/core/example.rb:179:in `run'
|
526
|
+
./spec/spec_helper.rb:102:in `__script__'
|
434
527
|
kernel/common/eval19.rb:45:in `instance_eval'
|
528
|
+
./spec/spec_helper.rb:59:in `sandboxed'
|
529
|
+
./spec/spec_helper.rb:102:in `__script__'
|
435
530
|
kernel/common/eval19.rb:105:in `instance_exec'
|
531
|
+
./lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
|
532
|
+
./lib/rspec/core/example.rb:247:in `instance_eval_with_args'
|
533
|
+
./lib/rspec/core/hooks.rb:93:in `run'
|
534
|
+
./lib/rspec/core/hooks.rb:91:in `run'
|
535
|
+
./lib/rspec/core/hooks.rb:424:in `run_hook'
|
536
|
+
./lib/rspec/core/example_group.rb:327:in `run_around_each_hooks'
|
537
|
+
./lib/rspec/core/example.rb:256:in `with_around_each_hooks'
|
538
|
+
./lib/rspec/core/example.rb:111:in `run'
|
539
|
+
./lib/rspec/core/example_group.rb:388:in `run_examples'
|
436
540
|
kernel/bootstrap/array19.rb:18:in `map'
|
541
|
+
./lib/rspec/core/example_group.rb:384:in `run_examples'
|
542
|
+
./lib/rspec/core/example_group.rb:369:in `run'
|
543
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
437
544
|
kernel/bootstrap/array19.rb:18:in `map'
|
545
|
+
./lib/rspec/core/example_group.rb:370:in `run'
|
546
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
438
547
|
kernel/bootstrap/array19.rb:18:in `map'
|
439
|
-
|
440
|
-
|
441
|
-
|
548
|
+
./lib/rspec/core/command_line.rb:28:in `run'
|
549
|
+
./lib/rspec/core/reporter.rb:34:in `report'
|
550
|
+
./lib/rspec/core/command_line.rb:25:in `run'
|
551
|
+
./lib/rspec/core/runner.rb:77:in `run'
|
552
|
+
./lib/rspec/core/runner.rb:17:in `autorun'
|
553
|
+
kernel/loader.rb:697:in `run_at_exits'
|
554
|
+
kernel/loader.rb:717:in `epilogue'
|
555
|
+
kernel/loader.rb:850:in `main'</pre></div>
|
442
556
|
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
|
443
557
|
</div>
|
444
558
|
</dd>
|
@@ -448,7 +562,8 @@ kernel/loader.rb:849:in `main'</pre></div>
|
|
448
562
|
<span class="duration">n.nnnns</span>
|
449
563
|
<div class="failure" id="failure_4">
|
450
564
|
<div class="message"><pre>Exception</pre></div>
|
451
|
-
<div class="backtrace"><pre>/foo.html.erb:1:in `<main>': foo (RuntimeError)
|
565
|
+
<div class="backtrace"><pre>/foo.html.erb:1:in `<main>': foo (RuntimeError)
|
566
|
+
from /lib/ruby/1.9.1/erb.rb:753:in `eval'</pre></div>
|
452
567
|
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for /foo.html.erb</span></code></pre>
|
453
568
|
</div>
|
454
569
|
</dd>
|
@@ -320,16 +320,16 @@ a {
|
|
320
320
|
<div class="failure" id="failure_1">
|
321
321
|
<div class="message"><pre>RSpec::Core::Pending::PendingExampleFixedError</pre></div>
|
322
322
|
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
|
323
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
324
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
325
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
326
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
327
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
328
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
323
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `block (2 levels) in <module:Formatters>'
|
324
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (5 levels) in <module:Formatters>'
|
325
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `open'
|
326
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (4 levels) in <module:Formatters>'
|
327
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `chdir'
|
328
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `block (3 levels) in <module:Formatters>'</pre></div>
|
329
329
|
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">"</span><span class="string">with content that would pass</span><span class="punct">"</span> <span class="keyword">do</span>
|
330
330
|
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
331
331
|
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
|
332
|
-
<span class="linenum">19</span> <span class="number">1</span><span class="punct"
|
332
|
+
<span class="linenum">19</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">1</span><span class="punct">)</span>
|
333
333
|
<span class="linenum">20</span> <span class="keyword">end</span></code></pre>
|
334
334
|
</div>
|
335
335
|
</dd>
|
@@ -359,15 +359,15 @@ expected: 2
|
|
359
359
|
(compared using ==)
|
360
360
|
</pre></div>
|
361
361
|
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:33:in `block (2 levels) in <top (required)>'
|
362
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
363
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
364
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
365
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
366
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
367
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
362
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `block (2 levels) in <module:Formatters>'
|
363
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (5 levels) in <module:Formatters>'
|
364
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `open'
|
365
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (4 levels) in <module:Formatters>'
|
366
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `chdir'
|
367
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `block (3 levels) in <module:Formatters>'</pre></div>
|
368
368
|
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">"</span><span class="string">failing spec</span><span class="punct">"</span> <span class="keyword">do</span>
|
369
369
|
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
370
|
-
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct"
|
370
|
+
<span class="offending"><span class="linenum">33</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
|
371
371
|
<span class="linenum">34</span> <span class="keyword">end</span>
|
372
372
|
<span class="linenum">35</span><span class="keyword">end</span></code></pre>
|
373
373
|
</div>
|
@@ -387,12 +387,12 @@ expected: 2
|
|
387
387
|
<div class="message"><pre>foo</pre></div>
|
388
388
|
<div class="backtrace"><pre>(erb):1:in `<main>'
|
389
389
|
./spec/rspec/core/resources/formatter_specs.rb:41:in `block (2 levels) in <top (required)>'
|
390
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
391
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
392
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
393
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
394
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
395
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
390
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:32:in `block (2 levels) in <module:Formatters>'
|
391
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (5 levels) in <module:Formatters>'
|
392
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `open'
|
393
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:54:in `block (4 levels) in <module:Formatters>'
|
394
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `chdir'
|
395
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:53:in `block (3 levels) in <module:Formatters>'</pre></div>
|
396
396
|
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
|
397
397
|
</div>
|
398
398
|
</dd>
|
data/spec/rspec/core/formatters/{html_formatted-1.9.2-jruby.html → html_formatted-2.0.0.html}
RENAMED
@@ -319,15 +319,17 @@ a {
|
|
319
319
|
<span class="duration">n.nnnns</span>
|
320
320
|
<div class="failure" id="failure_1">
|
321
321
|
<div class="message"><pre>RSpec::Core::Pending::PendingExampleFixedError</pre></div>
|
322
|
-
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `(
|
323
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
324
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
325
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
326
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
322
|
+
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
|
323
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:36:in `block (2 levels) in <module:Formatters>'
|
324
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (5 levels) in <module:Formatters>'
|
325
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `open'
|
326
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (4 levels) in <module:Formatters>'
|
327
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `chdir'
|
328
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `block (3 levels) in <module:Formatters>'</pre></div>
|
327
329
|
<pre class="ruby"><code><span class="linenum">16</span> <span class="ident">context</span> <span class="punct">"</span><span class="string">with content that would pass</span><span class="punct">"</span> <span class="keyword">do</span>
|
328
330
|
<span class="linenum">17</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
329
331
|
<span class="offending"><span class="linenum">18</span> <span class="ident">pending</span> <span class="keyword">do</span></span>
|
330
|
-
<span class="linenum">19</span> <span class="number">1</span><span class="punct"
|
332
|
+
<span class="linenum">19</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">1</span><span class="punct">)</span>
|
331
333
|
<span class="linenum">20</span> <span class="keyword">end</span></code></pre>
|
332
334
|
</div>
|
333
335
|
</dd>
|
@@ -356,14 +358,16 @@ expected: 2
|
|
356
358
|
|
357
359
|
(compared using ==)
|
358
360
|
</pre></div>
|
359
|
-
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:33:in `(
|
360
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
361
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
362
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
363
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
361
|
+
<div class="backtrace"><pre>./spec/rspec/core/resources/formatter_specs.rb:33:in `block (2 levels) in <top (required)>'
|
362
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:36:in `block (2 levels) in <module:Formatters>'
|
363
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (5 levels) in <module:Formatters>'
|
364
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `open'
|
365
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (4 levels) in <module:Formatters>'
|
366
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `chdir'
|
367
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `block (3 levels) in <module:Formatters>'</pre></div>
|
364
368
|
<pre class="ruby"><code><span class="linenum">31</span><span class="ident">describe</span> <span class="punct">"</span><span class="string">failing spec</span><span class="punct">"</span> <span class="keyword">do</span>
|
365
369
|
<span class="linenum">32</span> <span class="ident">it</span> <span class="punct">"</span><span class="string">fails</span><span class="punct">"</span> <span class="keyword">do</span>
|
366
|
-
<span class="offending"><span class="linenum">33</span> <span class="number">1</span><span class="punct"
|
370
|
+
<span class="offending"><span class="linenum">33</span> <span class="ident">expect</span><span class="punct">(</span><span class="number">1</span><span class="punct">).</span><span class="ident">to</span> <span class="ident">eq</span><span class="punct">(</span><span class="number">2</span><span class="punct">)</span></span>
|
367
371
|
<span class="linenum">34</span> <span class="keyword">end</span>
|
368
372
|
<span class="linenum">35</span><span class="keyword">end</span></code></pre>
|
369
373
|
</div>
|
@@ -381,12 +385,14 @@ expected: 2
|
|
381
385
|
<span class="duration">n.nnnns</span>
|
382
386
|
<div class="failure" id="failure_3">
|
383
387
|
<div class="message"><pre>foo</pre></div>
|
384
|
-
<div class="backtrace"><pre>(erb):1:in
|
385
|
-
./spec/rspec/core/resources/formatter_specs.rb:41:in `(
|
386
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
387
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
388
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
389
|
-
./spec/rspec/core/formatters/html_formatter_spec.rb:
|
388
|
+
<div class="backtrace"><pre>(erb):1:in `<main>'
|
389
|
+
./spec/rspec/core/resources/formatter_specs.rb:41:in `block (2 levels) in <top (required)>'
|
390
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:36:in `block (2 levels) in <module:Formatters>'
|
391
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (5 levels) in <module:Formatters>'
|
392
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `open'
|
393
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:58:in `block (4 levels) in <module:Formatters>'
|
394
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `chdir'
|
395
|
+
./spec/rspec/core/formatters/html_formatter_spec.rb:57:in `block (3 levels) in <module:Formatters>'</pre></div>
|
390
396
|
<pre class="ruby"><code><span class="linenum">-1</span><span class="comment"># Couldn't get snippet for (erb)</span></code></pre>
|
391
397
|
</div>
|
392
398
|
</dd>
|
@@ -6,7 +6,7 @@ require 'nokogiri'
|
|
6
6
|
module RSpec
|
7
7
|
module Core
|
8
8
|
module Formatters
|
9
|
-
describe HtmlFormatter, :if => RUBY_VERSION =~ /^(1.8.7|1.9.2|1.9.3)$/ do
|
9
|
+
describe HtmlFormatter, :if => RUBY_VERSION =~ /^(1.8.7|1.9.2|1.9.3|2.0.0)$/ do
|
10
10
|
let(:suffix) {
|
11
11
|
if ::RUBY_PLATFORM == 'java'
|
12
12
|
"-jruby"
|
@@ -27,7 +27,11 @@ module RSpec
|
|
27
27
|
%w[spec/rspec/core/resources/formatter_specs.rb --format html --order default]
|
28
28
|
)
|
29
29
|
options.parse_options
|
30
|
+
|
30
31
|
err, out = StringIO.new, StringIO.new
|
32
|
+
err.set_encoding("utf-8") if err.respond_to?(:set_encoding)
|
33
|
+
out.set_encoding("utf-8") if out.respond_to?(:set_encoding)
|
34
|
+
|
31
35
|
command_line = RSpec::Core::CommandLine.new(options)
|
32
36
|
command_line.run(err, out)
|
33
37
|
out.string.gsub(/\d+\.\d+(s| seconds)/, "n.nnnn\\1")
|
@@ -73,14 +77,14 @@ module RSpec
|
|
73
77
|
expected_backtraces = extract_backtrace_from(expected_doc)
|
74
78
|
expected_doc.search("div.backtrace").remove
|
75
79
|
|
76
|
-
actual_doc.inner_html.
|
80
|
+
expect(actual_doc.inner_html).to eq(expected_doc.inner_html)
|
77
81
|
|
78
82
|
expected_backtraces.each_with_index do |expected_line, i|
|
79
83
|
expected_path, expected_line_number, expected_suffix = expected_line.split(':')
|
80
84
|
actual_path, actual_line_number, actual_suffix = actual_backtraces[i].split(':')
|
81
|
-
File.expand_path(actual_path).
|
82
|
-
actual_line_number.
|
83
|
-
actual_suffix.
|
85
|
+
expect(File.expand_path(actual_path)).to eq(File.expand_path(expected_path))
|
86
|
+
expect(actual_line_number).to eq(expected_line_number)
|
87
|
+
expect(actual_suffix).to eq(expected_suffix)
|
84
88
|
end
|
85
89
|
end
|
86
90
|
end
|