Sha256: 38d36f801f8cf865085290875a59cc036580dd7b82c41f2a48933c0c96a1ea09

Contents?: true

Size: 883 Bytes

Versions: 13

Compression:

Stored size: 883 Bytes

Contents

require 'spec/runner/formatter/base_text_formatter'

module Spec
  module Runner
    module Formatter
      class SpecdocFormatter < BaseTextFormatter
        def add_example_group(example_group)
          super
          output.puts
          output.puts example_group.description
          output.flush
        end
      
        def example_failed(example, counter, failure)
          output.puts(red("- #{example.description} (FAILED - #{counter})"))
          output.flush
        end
        
        def example_passed(example)
          message = "- #{example.description}"
          output.puts green(message)
          output.flush
        end
        
        def example_pending(example, message, pending_caller)
          super
          output.puts yellow("- #{example.description} (PENDING: #{message})")
          output.flush
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
dchelimsky-rspec-1.1.99.1 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.13 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.2 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.3 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.4 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.5 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.6 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.7 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.8 lib/spec/runner/formatter/specdoc_formatter.rb
dchelimsky-rspec-1.1.99.9 lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.2.2 lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.2.1 lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.2.0 lib/spec/runner/formatter/specdoc_formatter.rb