Sha256: a51d75da92d6e75ab98a30b77c10ac33375325222935cc4ccb7d91f2496426a2

Contents?: true

Size: 989 Bytes

Versions: 41

Compression:

Stored size: 989 Bytes

Contents

require 'spec/runner/formatter/story/plain_text_formatter'

module Spec
  module Runner
    module Formatter
      module Story
        class ProgressBarFormatter < PlainTextFormatter

          def story_started(title, narrative) end
          def story_ended(title, narrative) end

          def run_started(count)
            @start_time = Time.now
            super
          end
          
          def run_ended
            @output.puts
            @output.puts
            @output.puts "Finished in %f seconds" % (Time.now - @start_time)
            @output.puts
            super
          end

          def scenario_ended
            if @scenario_failed
              @output.print red('F')
              @output.flush
            elsif @scenario_pending
              @output.print yellow('P')
              @output.flush
            else
              @output.print green('.')
              @output.flush
            end
          end

        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 10 rubygems

Version Path
dchelimsky-rspec-1.1.10 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.1 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.2 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.3 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.4 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.5 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.6 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11.7 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-1.1.11 lib/spec/runner/formatter/story/progress_bar_formatter.rb
dchelimsky-rspec-stories-1.0.0 lib/spec/runner/formatter/story/progress_bar_formatter.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/lib/spec/runner/formatter/story/progress_bar_formatter.rb
samstokes-rspec-stories-1.0.1 lib/spec/runner/formatter/story/progress_bar_formatter.rb
samstokes-rspec-stories-1.0.2 lib/spec/runner/formatter/story/progress_bar_formatter.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/formatter/story/progress_bar_formatter.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/formatter/story/progress_bar_formatter.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/formatter/story/progress_bar_formatter.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/runner/formatter/story/progress_bar_formatter.rb