123456789_123456789_123456789_123456789_123456789_

Class: Minitest::PrideIO

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/minitest/pride_plugin.rb

Overview

Show your testing pride!

Constant Summary

Class Attribute Summary

Class Method Summary

Instance Attribute Summary

  • #io readonly

    The IO we're going to pipe through.

Instance Method Summary

Class Attribute Details

.pride?Boolean (readonly)

Are we showing our testing pride?

[ GitHub ]

  
# File 'lib/minitest/pride_plugin.rb', line 35

def self.pride?
  @pride ||= false
end

Class Method Details

.pride!

Activate the pride plugin. Called from both -p option and minitest/pride

[ GitHub ]

  
# File 'lib/minitest/pride_plugin.rb', line 28

def self.pride!
  @pride = true
end

Instance Attribute Details

#io (readonly)

The IO we're going to pipe through.

[ GitHub ]

  
# File 'lib/minitest/pride_plugin.rb', line 46

attr_reader :io

Instance Method Details

#pride(string)

Color a string.

[ GitHub ]

  
# File 'lib/minitest/pride_plugin.rb', line 89

def pride string
  string = "*" if string == "."
  c = @colors[@index % @size]
  @index += 1
  "#{ESC}#{c}m#{string}#{NND}"
end