Class: RSpec::Undefined::Formatter
- Inherits:
-
Object
- Object
- RSpec::Undefined::Formatter
- Defined in:
- lib/rspec/undefined/formatter.rb
Constant Summary collapse
- UNCATEGORIZED =
"(uncategorized)"
Instance Method Summary collapse
- #dump_summary(_notification) ⇒ Object
-
#initialize(output = $stdout) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
#initialize(output = $stdout) ⇒ Formatter
Returns a new instance of Formatter.
8 9 10 |
# File 'lib/rspec/undefined/formatter.rb', line 8 def initialize(output = $stdout) @output = output end |
Instance Method Details
#dump_summary(_notification) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rspec/undefined/formatter.rb', line 12 def dump_summary(_notification) entries = RSpec::Undefined.registry.all return if entries.empty? @output.puts @output.puts "Undefined spec items:" entries.each_with_index do |e, i| @output.puts format_entry(i + 1, e) end @output.puts @output.puts "undefined: #{entries.size}" dump_by_category(entries) end |