Sha256: 7c521e0e0def1d3a6743686b7f6c7205c28acac0d024e56959e8884fc83d3bba

Contents?: true

Size: 852 Bytes

Versions: 4

Compression:

Stored size: 852 Bytes

Contents

module Spec
  module Runner
    module Formatter
      class SpecdocFormatter < BaseTextFormatter      
        def add_behaviour(name)
          @output.puts
          @output.puts name
          @output.flush
        end
      
        def example_failed(example, counter, failure)
          @output.puts failure.expectation_not_met? ? red("- #{example.description} (FAILED - #{counter})") : magenta("- #{example.description} (ERROR - #{counter})")
          @output.flush
        end
      
        def example_passed(example)
          @output.puts green("- #{example.description}")
          @output.flush
        end
        
        def example_pending(behaviour_name, example_name, message)
          super
          @output.puts yellow("- #{example_name} (PENDING: #{message})")
          @output.flush
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
deckshuffler-0.0.2 vendor/plugins/rspec/lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.0.6 lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.0.7 lib/spec/runner/formatter/specdoc_formatter.rb
rspec-1.0.8 lib/spec/runner/formatter/specdoc_formatter.rb