Sha256: 41d41c10493edbb045260ec43253a271fff224290a49fed1a4dad9a53e69221e

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 Bytes

Contents

module RSpecFormatter
  
  def rspactor_title
    "RSpec results"
  end
  
  def rspactor_message(example_count, failure_count, pending_count, duration)
    message = "#{example_count} examples, #{failure_count} failures"
    if pending_count > 0
      message << " (#{pending_count} pending)"
    end
    message << "\nin #{duration} seconds"
    message
  end
  
  # failed | pending | success
  def rspactor_image_path(failure_count, pending_count)
    icon = if failure_count > 0
      'failed'
    elsif pending_count > 0
      'pending'
    else
      'success'
    end
    File.expand_path(File.dirname(__FILE__) + "/images/#{icon}.png")
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspactor-0.7.0.beta.7 lib/formatters/rspec_formatter.rb
rspactor-0.7.0.beta.6 lib/formatters/rspec_formatter.rb
rspactor-0.7.0.beta.5 lib/formatters/rspec_formatter.rb
rspactor-0.7.0.beta.4 lib/formatters/rspec_formatter.rb