Sha256: 34b4e9682ed8a8cc4d1a2c6d60203dd9be64ffc4028fcb59997ed3543f06d701

Contents?: true

Size: 445 Bytes

Versions: 6

Compression:

Stored size: 445 Bytes

Contents

require 'spec/runner/base_text_formatter'

# Example of a custom formatter. Run me with:
# bin/spec examples -r examples/custom_formatter.rb -f CustomFormatter
class CustomFormatter < Spec::Runner::BaseTextFormatter
  def add_context(name, first)
    @output << "\n" if first
  end
  
  def spec_failed(name, counter)
    @output << 'X'
  end
  
  def spec_passed(name)
    @output << '_'
  end
  
  def start_dump
    @output << "\n"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rspec-0.5.10 examples/custom_formatter.rb
rspec-0.5.11 examples/custom_formatter.rb
rspec-0.5.12 examples/custom_formatter.rb
rspec-0.5.9 examples/custom_formatter.rb
rspec-0.5.7 examples/custom_formatter.rb
rspec-0.5.8 examples/custom_formatter.rb