rfc 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc6ed7117d0926b458828ef53d9fc3e776711051832459b939f4781b405ff08e
4
- data.tar.gz: 706b3e9c79d7a3c44d61272845023baed7721943c8b6477b08dc17d4595fd5e9
3
+ metadata.gz: 04fa1dfc9002e8040bc882dd222a69b0847864554503999681e6937ddbf5c11e
4
+ data.tar.gz: 6990f5279ce8c11b17ef65fb9541dae403db4b129282f34e45e71dbc02b71ccb
5
5
  SHA512:
6
- metadata.gz: d55864fab50e1e834554bbece18ac91210db2385bb38f54902e7bc55c1f534cb195d2762db7c9453a31f4380e628e4c5daad15f9eca8eb9926898824647ce0e9
7
- data.tar.gz: 030d4210bde46fd903130b84941b6c8c140c2a9714ef89db7f9706d5df0f613f166359f885c791e3af3fb3a876f572a3af6fdfab09652bee5ad17f908e816189
6
+ metadata.gz: c1121b9d6ddd02a216da1275d7c5024ced12b97c7ec0f7c59a9c408bed7d485e42afbbc6f56735e5559aa0f87c78d4743b5f9f0d7907088a9df83e167ce958f5
7
+ data.tar.gz: 7185313c51ac7aafb7e872f89b44cb3b08a3178eaca82a76bfb26ca4c37c1c656070c37a52b6c23db17caeb14432b82e15094be1bc94a7561ba277666b98a2aa
data/README.md CHANGED
@@ -30,6 +30,8 @@ To enable memory and CPU statistics reporting, add to your `spec_helper.rb`:
30
30
 
31
31
  Rfc::Rif.output_system_load = true
32
32
 
33
+ At the end of the run Aif lists up to the first 10 pending examples.
34
+
33
35
 
34
36
  ## Announce Formatter (Announce)
35
37
 
@@ -47,6 +49,8 @@ RSpec's documentation formatter does.
47
49
  This is the announce formatter with insta-fail feature. It reports
48
50
  failures as soon as they happen, after each example is executed.
49
51
 
52
+ At the end of the run Aif lists up to the first 10 pending examples.
53
+
50
54
 
51
55
  ## License
52
56
 
@@ -1,12 +1,15 @@
1
+ require 'rfc/shared/brief_pending'
1
2
  require 'rfc/announce'
2
3
 
3
4
  module Rfc
4
5
  class Aif < Announce
6
+ include Shared::BriefPending
7
+
5
8
  RSpec::Core::Formatters.register self,
6
9
  :example_group_started, :example_group_finished,
7
10
  :start, :example_started,
8
11
  :example_passed, :example_pending, :example_failed,
9
- :dump_failures, :dump_summary
12
+ :dump_summary, :dump_failures, :dump_pending
10
13
 
11
14
  def start(notification)
12
15
  @failed_count = 0
@@ -1,9 +1,12 @@
1
1
  require 'rspec/core'
2
2
  require 'rfc/cpu_time_averager'
3
+ require 'rfc/shared/brief_pending'
3
4
  RSpec::Support.require_rspec_core "formatters/base_text_formatter"
4
5
 
5
6
  module Rfc
6
7
  class Rif < RSpec::Core::Formatters::BaseTextFormatter
8
+ include Shared::BriefPending
9
+
7
10
  RSpec::Core::Formatters.register self,
8
11
  :message, :dump_summary, :dump_failures, :dump_pending, :seed,
9
12
  :example_passed, :example_pending, :example_failed
@@ -0,0 +1,27 @@
1
+ module Rfc
2
+ module Shared
3
+ module BriefPending
4
+
5
+ def dump_pending(notification)
6
+ return if notification.pending_examples.empty?
7
+
8
+ formatted = "\nPending: (Failures listed here are expected and do not affect your suite's status)\n".dup
9
+
10
+ pending_notifications = notification.pending_notifications
11
+ colorizer = ::RSpec::Core::Formatters::ConsoleCodes
12
+
13
+ pending_notifications.first(10).each_with_index do |notification, index|
14
+ formatted << notification.fully_formatted(index.next, colorizer)
15
+ end
16
+
17
+ if pending_notifications.length > 10
18
+ formatted << colorizer.wrap(
19
+ "\n+ #{pending_notifications.length-10} more pending examples",
20
+ :yellow)
21
+ end
22
+
23
+ output.puts(formatted)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module Rfc
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-24 00:00:00.000000000 Z
11
+ date: 2020-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
@@ -38,6 +38,7 @@ files:
38
38
  - lib/rfc/cpu_time_averager.rb
39
39
  - lib/rfc/rif.rb
40
40
  - lib/rfc/riff.rb
41
+ - lib/rfc/shared/brief_pending.rb
41
42
  - lib/rfc/version.rb
42
43
  homepage: https://github.com/p-mongo/rfc
43
44
  licenses:
@@ -62,5 +63,5 @@ requirements: []
62
63
  rubygems_version: 3.1.2
63
64
  signing_key:
64
65
  specification_version: 4
65
- summary: rfc-0.1.1
66
+ summary: rfc-0.2.0
66
67
  test_files: []